-
Notifications
You must be signed in to change notification settings - Fork 15
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
First authentication in Studio raises a 500 error: social_core.exceptions.AuthStateMissing: Session value state missing.
#114
Comments
I can confirm that this issue is actually a duplicate of #110. Both issues are fixed by overhangio/tutor#536. |
Unfortunately I just realized that the issue occurs again in Maple. It is visible for instance on the Tutor demo website: https://studio.demo.openedx.overhang.io (login: admin, password: admin). As far as I understand, the error comes from the fact that the "sessionid" cookies (and actually: all cookies dropped by the LMS) are set with "samesite: lax". I do not understand why this happens, despite the fact that we have SESSION_COOKIE_SAMESITE = "None" in production. |
Hi, I want to contribute to openedx. Can I work on this issue? |
Sure @shubhamgoyal42, that would be awesome! |
@regisb, can you point me towards a setup guide? |
Hey @shubhamgoyal42 , thanks for contributing to the community. Could you please specify how we can help you? Are you having problems with the Tutor setup? |
Login to the studio was causing a 500 error, although the user was correctly connected. See the issue description here: openedx/wg-build-test-release#114 The error was caused by the fact that both LMS and CMS session cookies were being sent to the CMS and the LMS session cookie was considered the "right" one. To clarify between both cookies, we need to have different session cookie names between the lms and the cms. This requirement was actually documented in step 5 of this authentication migration document: https://github.com/openedx/edx-platform/blob/master/docs/guides/studio_oauth.rst#migration For more information, have a look at the live stream during which this issue was debugged: https://youtu.be/m3t1U_y6F64 Close openedx/wg-build-test-release#114
I investigated this issue during today's livestream and I'm happy to report that I have a fix: overhangio/tutor#667 |
Login to the studio was causing a 500 error, although the user was correctly connected. See the issue description here: openedx/wg-build-test-release#114 The error was caused by the fact that both LMS and CMS session cookies were being sent to the CMS and the LMS session cookie was considered the "right" one. To clarify between both cookies, we need to have different session cookie names between the lms and the cms. This requirement was actually documented in step 5 of this authentication migration document: https://github.com/openedx/edx-platform/blob/master/docs/guides/studio_oauth.rst#migration For more information, have a look at the live stream during which this issue was debugged: https://youtu.be/m3t1U_y6F64 Close openedx/wg-build-test-release#114
How to reproduce:
Note that we are successfully logged in the CMS, despite the error.
Here are the logs from the cms container:
The following upstream issue might be related: python-social-auth/social-core#250: there, it is suggested to define
SESSION_COOKIE_SAMESITE = "None"
. But in Open edX, we have instead:DCS_SESSION_COOKIE_SAMESITE = "None"
. Indeed, this setting comes from the django-cookies-samesite project: https://pypi.org/project/django-cookies-samesite/The readme of django-cookies-samesite includes the following warning:
Yet, edx-platform includes a mix of
DCS_SESSION_*
andSESSION_*
settings. I'm not sure how this could cause an issue, but it's a good starting lead.The text was updated successfully, but these errors were encountered: