Skip to content

getGrant hides the cause of grant validation failure #506

@sanoodles

Description

@sanoodles

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions