tymondesigns/jwt-auth · error · Tymon\JWTAuth\Exceptions\JWTException
You must have the blacklist enabled to invalidate a token.
Error message
You must have the blacklist enabled to invalidate a token.
What it means
Error "You must have the blacklist enabled to invalidate a token." thrown in tymondesigns/jwt-auth.
Source
Thrown at src/Manager.php:149
// Return the new token
return $this->encode(
$this->payloadFactory->customClaims($claims)->make($resetClaims)
);
}
/**
* Invalidate a Token by adding it to the blacklist.
*
* @param \Tymon\JWTAuth\Token $token
* @param bool $forceForever
* @return bool
*
* @throws \Tymon\JWTAuth\Exceptions\JWTException
*/
public function invalidate(Token $token, $forceForever = false)
{
if (! $this->blacklistEnabled) {
throw new JWTException('You must have the blacklist enabled to invalidate a token.');
}
return call_user_func(
[$this->blacklist, $forceForever ? 'addForever' : 'add'],
$this->decode($token, false)
);
}
/**
* Build the claims to go into the refreshed token.
*
* @param \Tymon\JWTAuth\Payload $payload
* @return array
*/
protected function buildRefreshClaims(Payload $payload)
{
// Get the claims to be persisted from the payload
$persistentClaims = collect($payload->toArray())View on GitHub (pinned to 6c70930a92)
When it happens
Trigger: Thrown at src/Manager.php:149 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of tymondesigns/jwt-auth@6c70930a92 (2026-08-21).
Data as JSON: /api/errors/adea4c0722531e0c.
Report an issue: GitHub.