I’m trying to secure my Node.js app with keycloak-connect, but after successful login Keycloak responds with 403 Access denied. Specified list of roles is empty:
app.all(
'/',
keycloak.protect(),
(req,res) => res.send('Secured Express + TypeScript Server'),
)
Keycloak configured in most basic way: just realm, client and user added:
-
Master→Add realm→ Name:kingdom -
Clients→Create→ Client ID:nodejs -
Clients→nodejs→Settings:-
Access Type: confidential -
Valid Redirect URIs: *
-
I’ve build minimal complete project which can be run with single ./run.sh command.
Could you please give me a hint on what Keycloak configuration I’m missing? Thanks in advance.