keycloak / keycloak-nodejs-connect

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

getGrant hides the cause of grant validation failure

sanoodles opened this issue · comments

Describe the bug

Steps to reproduce:

  1. Use keycloak.protect() to protect a path like eg. here https://github.com/keycloak/keycloak-quickstarts/blob/99725dc62f0bca92857ff2d947829611517ed63e/nodejs/resource-server/app.js#L16
  2. Use the app to generate a valid token that has, however, some subtle problem like being generated for localhost instead of 127.0.01

What should happen:

  • The logged error message should point to the specific cause of failure. Like "Grant validation failed. Reason: invalid token (wrong ISS)"

What happens instead:

  • The logged error message is just "Could not obtain grant code error"

Version

22.0.1

Expected behavior

No response

Actual behavior

No response

How to Reproduce?

No response

Anything else?

No response