LexikJWTAuthenticationBundle
LexikJWTAuthenticationBundle copied to clipboard
Error 500 when trying to use new blocklist feature
Hi,
Symfony version : 5.4.42 PHP version : 8.2.6 Lexik bundle version : 2.21.0
I want to implement token invalidation so I followed this related documentation: https://github.com/lexik/LexikJWTAuthenticationBundle/blob/2.x/Resources/doc/10-invalidate-token.rst
Problem encoutered: when I add the blocklist_token
configuration, all endpoints are returning an HTTP 500 error.
Here is my lexik_jwt_authentication.yaml:
lexik_jwt_authentication:
secret_key: '%env(resolve:JWT_SECRET_KEY)%'
public_key: '%env(resolve:JWT_PUBLIC_KEY)%'
pass_phrase: '%env(JWT_PASSPHRASE)%'
token_ttl: 86400 # 1 day
# invalidate the token on logout by storing it in the cache
blocklist_token:
enabled: true
cache: cache.app
It seems that the problem is triggered by the service declaration (vendor\lexik\jwt-authentication-bundle\Resources\config\blocklist_token.xml):
Any idea? Thanks!