I implement a Symfony Backend with Authentication via the Lexik Bundle. Everything is working as expected. If I send a request to my /authentication_token endpoint I get a token and refresh token. With this token I am able to access protected routes. Now I want that my Backend extract token from a cookie. I set the lexik config like this.
lexik_jwt_authentication:
secret_key: '%env(resolve:JWT_SECRET_KEY)%'
public_key: '%env(resolve:JWT_PUBLIC_KEY)%'
pass_phrase: '%env(JWT_PASSPHRASE)%'
token_extractors:
authorization_header:
enabled: false
prefix: Bearer
name: Authorization
cookie:
enabled: true
name: Bearer
Also because I set authorization_header to false the authentication not working with authorize header anymore (as expected). But the Backend does not access a token from cookie. I setup a Vue application that is setting a cookie with the name "Bearer". The value is a hard defined token value i created manually. But i Still get 401 (unauthorized) reponse. Does anyone has experience with this? It would help me a lot :)