8000 'Key not found' error for a GET request to userinfo endpoint, with a valid access token · keycloak keycloak · Discussion #48956 · GitHub
[go: up one dir, main page]

Skip to content
Discussion options

You must be logged in to vote

"Key not found" on the userinfo endpoint usually means Keycloak is trying to verify the access token's signature with a key that doesn't exist in the realm's active key set anymore.

The most common cause in a docker-compose setup: your Keycloak container got recreated (or the DB volume got wiped), which regenerated the realm keys. But you're still holding an access token signed with the old key. The kid in the token header might match what you see in the admin UI because you're looking at the new keys — but the token was signed by the previous instance's key.

Quick check: decode your access token (jwt.io or jq -R 'split(".") | .[0],.[1] | @base64d | fromjson') and compare the kid in the h…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@davep-argo
Comment options

Answer selected by davep-argo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
0