I had an issue with using mozilla-django-oidc was that the user would log in with OIDC, get redirected to our provider, but ultimately get returned to the login failure url (/ by default) and not get logged in. The problem was that the sessionid cookie was not getting returned to us in Firefox, because the SESSION_COOKIE_SAMESITE setting is set to "Strict" in ColdFront's default settings in auth.py.
I fixed the problem by changing the setting to "Lax".
Also removed an extra newline at the start of the code block.
I had an issue with using
mozilla-django-oidc
was that the user would log in with OIDC, get redirected to our provider, but ultimately get returned to the login failure url (/
by default) and not get logged in. The problem was that thesessionid
cookie was not getting returned to us in Firefox, because theSESSION_COOKIE_SAMESITE
setting is set to"Strict"
in ColdFront's default settings inauth.py
.I fixed the problem by changing the setting to
"Lax"
.Also removed an extra newline at the start of the code block.