service-nodejs demo works with keycloak (20.0.1) without any modification. It's fine.
However, it uses the very old keycloak-connect module that is github:keycloak/keycloak-nodejs-connect#c1ea3e121ecb7dc2da8ba71d09a2fcf3559961f4 (almost 9.0.0-dev).
So that, I upgrade keycloak-connect module to the latest version (20.0.1).
And then access http://localhost:3000/service/secured with a browser, the browser showed Access denied and the console of the node outputs
Could not obtain grant code: Error: Grant validation failed. Reason: invalid token (wrong audience)
Version
20.0.1
Expected behavior
The browser shows {"message":"secured"}, when a browser accesses http://localhost:3000/service/secured.
Actual behavior
And then access http://localhost:3000/service/secured with a browser, the browser showed Access denied and the console of the node outputs
Could not obtain grant code: Error: Grant validation failed. Reason: invalid token (wrong audience)
Describe the bug
service-nodejs
demo works with keycloak (20.0.1) without any modification. It's fine.However, it uses the very old
keycloak-connect
module that isgithub:keycloak/keycloak-nodejs-connect#c1ea3e121ecb7dc2da8ba71d09a2fcf3559961f4
(almost 9.0.0-dev).So that, I upgrade
keycloak-connect
module to the latest version (20.0.1
). And then accesshttp://localhost:3000/service/secured
with a browser, the browser showedAccess denied
and the console of the node outputsVersion
20.0.1
Expected behavior
The browser shows
{"message":"secured"}
, when a browser accesseshttp://localhost:3000/service/secured
.Actual behavior
And then access
http://localhost:3000/service/secured
with a browser, the browser showedAccess denied
and the console of the node outputsHow to Reproduce?
Edit package.json
Build and run the app.
Anything else?
No response