-
Notifications
You must be signed in to change notification settings - Fork 7
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
[Bug]: session cookie is missing in Chrome and Safari #27
Comments
The issue was initially reported by @jawabuu, see #24 (comment). |
@jawabuu I have a fix: apparently setting the Secure flag on the cookie is sufficient and it seems the cookie is sent to localhost despite the fact that TLS is not used. That should solve the issue for now (although the long-term solution is probably to support TLS, I will create a separate issue for that). I need a couple of hours to find the time to test the fix with different browsers and to release. I will let you know when it's done. |
@thomasleplus So I tried it on a server with https redirect_uri
|
Sorry I wasn't clear. The issue is that the page starting the OpenID Connect flow (http://localhost:8080/debug) is not using https so the session cookie that it sets is discarded. That's why you get the error that 'cookie_session' is nil (missing). The fix that I found is to set the Secure flag on the cookie. Then it is saved even though the page is not https. At least for Chrome. But Safari has a peculiar bug (at least IMHO): it does not save cookies received in redirection response. I didn't know that but it is well documented: I will try to think about a workaround but for now I have pushed the fix that works for Chrome. I hope that will help. |
Is there an existing issue for this?
Current Behavior
It seems that Firefox accepts the session cookie with flag SameSite=None with a warning but not Chrome or Safari. Chrome says:
As a result, the OIDC flow ends in an internal server error 500 and the following message in the debugger log: "error opening session".
Expected Behavior
No internal server error.
version
Relevant log output
"error opening session"
Steps To Reproduce
Just use a recent version of Chrome or Safari.
Anything else?
No response
The text was updated successfully, but these errors were encountered: