-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The CSRF value from the token does not match the CSRF value from the data store #923
Comments
If the CSRF value doesn't match, you might have started the oauth2 flow in two browsers or tabs, or something is wrong with the cookies. If you're behind an API gateway or router, make sure the cookies make it through. Try to restart the flow and see if it works. |
@arekkas I set up on my computer with docker installation, I close all browser, clear cache/cookie, the problem still occurs. I try another browser and issue doesn't go :( There is minor log on Postgres I found:
|
Is hydra running behind a proxy (e.g. ngnix, kong, load balancer, ...)? |
@arekkas I think the problem comes from Docker on Windows. I remove all containers (Postgress/Hydra). Restart docker and setup step by step again then it works. |
Ok, that's weird, glad it works now. |
@aeneasr I am getting same error
I have started the oauth2 flow in two tabs simultaneously , one flow successfully completed and one is failed .hydra is running in windows with binary not with docker and it is not behind any proxy server |
Hydra doesn't support two simoultaneous oauth2 auth code flows from the same browser. |
Is there any way to work this around? I mean, when you try to login in second tab while being already logged in on the other tab (meaning that you have all the cookies from session and browser is sending them while trying to log in second time) it should just check whether cookies are still valid (might additionally check verify again if user is allowed with login and password since they're provided) and just redirect user to landing page (or where (s)he intended to go. |
If you're initiating 2 OAuth2 Flows in separate browser tabs, then you will end up with 2 states, implying that at least on flow won't work, which is equal to how the CSRF value behaves. |
We worked around that by sending messages between the multiple tabs in localstorage - when one tab is newer, disable the old tab in javascript and do something like "click here to log in again", which starts new oauth flow. |
Hello, try double checking the domain name everywhere you use it ! |
I try to deploy v1.0.0-beta.5-alpine and test win consent from the source:
https://github.com/ory/hydra-login-consent-node
When login success and redirect, the error show:
The CSRF value from the token does not match the CSRF value from the data store
The log file:
What is the expected behavior?
It should pass and or if having the error, please log more detail
Which version of the software is affected?
v1.0.0-beta.5-alpine
v1.0.0-beta.6-alpine
The text was updated successfully, but these errors were encountered: