keycloak-nodejs-multirealm icon indicating copy to clipboard operation
keycloak-nodejs-multirealm copied to clipboard

Grant validation failed. Reason: failed to load public key to verify token.

Open mNeevetha opened this issue 5 years ago • 2 comments

Hi @c3s4r , Using keycloak-connect-multirealm module, I'm able to get the realm name from the token passed in each request, but how do we get the realm-public-key for each realm? Since the realm-public-key is not configured it is resulting in ERROR: Grant validation failed. Reason: failed to load public key to verify token. Any idea on how this could be achieved? Thanks in Advance!

mNeevetha avatar Apr 30 '19 10:04 mNeevetha

The key can be found in Realm Settings -> Keys -> Public key (see this Stackoverflow for more details). Set realm-public-key to this value. I've logged a ticket about this problem.

Fydon avatar Oct 07 '21 14:10 Fydon

It turns out that when I saw this issue that it was the root certificate authority of my certificate was not trusted by NodeJS.

Fydon avatar Oct 07 '21 19:10 Fydon