You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Keycloak gives me the error response invalid_token: Token verification failed.
When looking at where this error is thrown (here), it just doesn't really clarify for me what part of this "verification" could possibly cause this to occur.
Setup
I've setup Keycloak with docker compose, alongside with Traefik, to use OAuth2 for my Symfony 6 application.
The idea is as follows:
User goes to symfony-app-dashboard.local/connect/keycloak in the application gets redirect to keycloak.development.local to login (with the correct realm).
User logs in successfully and gets redirect back to symfony-app-dashboard.local/connect/keycloak/check to authenticate the user further.
The exception invalid_token: Token verification failed is thrown (found in the WWW-Authenticate header when dumping the Guzzle response)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Keycloak gives me the error response
invalid_token: Token verification failed.When looking at where this error is thrown (here), it just doesn't really clarify for me what part of this "verification" could possibly cause this to occur.
Setup
I've setup Keycloak with docker compose, alongside with Traefik, to use OAuth2 for my Symfony 6 application.
The idea is as follows:
symfony-app-dashboard.local/connect/keycloakin the application gets redirect tokeycloak.development.localto login (with the correct realm).symfony-app-dashboard.local/connect/keycloak/checkto authenticate the user further.invalid_token: Token verification failedis thrown (found in theWWW-Authenticateheader when dumping the Guzzle response)The container for the application has access to keycloak through
http://keycloak:8080, which is also setup asproxyin the knpuniversity/oauth2-client-bundle configuration.For the debug log, see this issue.
Question
Can someone explain me in easy to understand terms what causes keycloak to return
invalid_token: Token verification failed?Beta Was this translation helpful? Give feedback.
All reactions