getGrant hides the cause of grant validation failure
sanoodles opened this issue · comments
Samuel Gomez commented
Describe the bug
Steps to reproduce:
- Use keycloak.protect() to protect a path like eg. here https://github.com/keycloak/keycloak-quickstarts/blob/99725dc62f0bca92857ff2d947829611517ed63e/nodejs/resource-server/app.js#L16
- 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