You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
May be related to #11641 (which is the more serious issue, but this may help resolve it as well, it's certainly easier to reproduce)
If you login with next-auth using the keycloak provider using standard flow, without an idp_hint, the login is succesful and you will be redirected to the dashboard and everything will work.
However if you click the browser "back" button, after the redirect to the dashboard, you will be redirected to:
Maybe it gets deleted after a succesful verification and the no longer exists when the user clicks back? Or maybe it's because of the 900 age limit on the cookie.
How to reproduce
Set up keycloak with standard flow
Remove idp_hint from reproduction app, and update the issuer to match your keycloak deployment
Deploy reproduction app to Vercel
Login (see succeful redirect)
Click back button.
See error
Expected behavior
Clicking "back" button after a succesful login in this case should redirect you to / (the same page you are already on)
The text was updated successfully, but these errors were encountered:
MarkLyck
added
bug
Something isn't working
triage
Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime.
labels
Aug 20, 2024
Environment
Reproduction URL
https://github.com/MarkLyck/keycloak-pkce-error-reproduction
Describe the issue
May be related to #11641 (which is the more serious issue, but this may help resolve it as well, it's certainly easier to reproduce)
If you login with next-auth using the keycloak provider using standard flow, without an idp_hint, the login is succesful and you will be redirected to the dashboard and everything will work.
However if you click the browser "back" button, after the redirect to the dashboard, you will be redirected to:
"https://colony-nextjs-git-patch-next-auth-with-logs-colonynetworks.vercel.app/api/auth/error?error=Configuration"
with the error:
I added a console.log inside the @auth/core package where the pkce check is done, and the code_verifier is
undefined
.Maybe it gets deleted after a succesful verification and the no longer exists when the user clicks back? Or maybe it's because of the 900 age limit on the cookie.
How to reproduce
Expected behavior
Clicking "back" button after a succesful login in this case should redirect you to
/
(the same page you are already on)The text was updated successfully, but these errors were encountered: