keycloak nodejs adapter unable to

757 Views Asked by At

I am trying to get the nodejs adapter to working with my Express application and am getting issues after an authorisation code is returned for a user and then a subsequent request is made to exchange this for an access token.

Through some debugging of the library it seems the redirect_uri being sent in the subsequent request is blank, and when adding a breakpoint and inspecting the below code, I can see a session object is present, but there is no auth_redirect_uri property present

enter image description here

Watching the initial request when authorising the user, I can see the redirect_uri is present in the request query params.

enter image description here

So I can only think for some reason this is not being parsed out by the nodejs adapter after the user has been authorised and then persisted to the session object.

My express application does use the express-session middleware which I have configured to save sessions to a mongoDB. I then use my configured session store with the keycloak middleware configuration, in the same way as per this example

Can anyone offer any thoughts on what may be happening here?

Thanks

0

There are 0 best solutions below