Closed vholik closed 6 months ago
@sl1mpshady could you maybe have a look please?
Was able to reproduce the issue. I found out this error if
Kindly check your client secret from the keycloak client settings to verify if it's correct
@sl1mpshady could you maybe have a look please?
The package is expecting to always have the user after login but on this case when the client secret is wrong it was not able to get the profile. might be best to add an error handler on this part and redirect back the user to login page with error. WDYT @adrien2p
If the secret is wrong, what is its content when we receive it? I would have thought that the parsing would have failed from there no?
I tried using the old version and the default oauth2 is returning the same issue so it was not handled maybe
Thanks for help. Actually the client secret was correct. Incorrect was a tokenURL
.
Incorrect: http://.../auth/realms/master/protocol/openid-connect/token
.
Correct: https://.../realms/master/protocol/openid-connect/token
I will add an error handling for this @adrien2p. instead of not showing anything, we redirect the user back to the login with the error message thrown by passport
Im using the latest version of the auth plugin to integrate with Keycloak.
Here my options in medusa config
This function causes the problem because
req.user
is undefined. Adding?returnAccessToken
doesn't change error message.