{"record":{"id":"adea4c0722531e0c","repo":"tymondesigns/jwt-auth","slug":"you-must-have-the-blacklist-enabled-to-invalidate","errorCode":null,"errorMessage":"You must have the blacklist enabled to invalidate a token.","messagePattern":"You must have the blacklist enabled to invalidate a token\\.","errorType":"exception","errorClass":"Tymon\\JWTAuth\\Exceptions\\JWTException","httpStatus":null,"severity":"error","filePath":"src/Manager.php","lineNumber":149,"sourceCode":"        // Return the new token\n        return $this->encode(\n            $this->payloadFactory->customClaims($claims)->make($resetClaims)\n        );\n    }\n\n    /**\n     * Invalidate a Token by adding it to the blacklist.\n     *\n     * @param  \\Tymon\\JWTAuth\\Token  $token\n     * @param  bool  $forceForever\n     * @return bool\n     *\n     * @throws \\Tymon\\JWTAuth\\Exceptions\\JWTException\n     */\n    public function invalidate(Token $token, $forceForever = false)\n    {\n        if (! $this->blacklistEnabled) {\n            throw new JWTException('You must have the blacklist enabled to invalidate a token.');\n        }\n\n        return call_user_func(\n            [$this->blacklist, $forceForever ? 'addForever' : 'add'],\n            $this->decode($token, false)\n        );\n    }\n\n    /**\n     * Build the claims to go into the refreshed token.\n     *\n     * @param  \\Tymon\\JWTAuth\\Payload  $payload\n     * @return array\n     */\n    protected function buildRefreshClaims(Payload $payload)\n    {\n        // Get the claims to be persisted from the payload\n        $persistentClaims = collect($payload->toArray())","sourceCodeStart":131,"sourceCodeEnd":167,"githubUrl":"https://github.com/tymondesigns/jwt-auth/blob/6c70930a92710d97e8e52b182fca2176097f33be/src/Manager.php#L131-L167","documentation":"Error \"You must have the blacklist enabled to invalidate a token.\" thrown in tymondesigns/jwt-auth.","triggerScenarios":"Thrown at src/Manager.php:149 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6c70930a92710d97e8e52b182fca2176097f33be","analyzedAt":"2026-08-21T02:16:37.040Z","schemaVersion":2},"datasetVersion":"2026-08-21T03:17:12.404Z"}