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, hence this issue.
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)
This discussion was converted from issue #9445 on January 27, 2022 09:38.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
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.
-
Describe the bug
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, hence this issue.
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.Below the debug log from the keycloak container when refreshing the page once after the error occurred. It shows
Version
16.1.0
Expected behavior
No token verification failure or adding a more descriptive reason for failing.
Actual behavior
How to Reproduce?
Setup
16.1.0(with Postgres14-alpine)2.58.1with Symfony6, including the knpuniversity/oauth2-client-bundle and stevenmaguire/oauth2-keycloak libraries.Anything else?
More information can be found in this SO issue I've created in a desperate attempt to find a solution.
Beta Was this translation helpful? Give feedback.
All reactions