keycloak-nodejs-multirealm
keycloak-nodejs-multirealm copied to clipboard
Grant validation failed. Reason: failed to load public key to verify token.
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!
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.
It turns out that when I saw this issue that it was the root certificate authority of my certificate was not trusted by NodeJS.