-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Google Login breaks when SESSION_COOKIE_SAMESITE
is set to Strict
#3232
Comments
Could you provide logs please? always a good idea to provide a snapshot of what happened and any relevant configuration. This would include allauth version, python version, etc. |
I can confirm this error, but for me it happens every time when using Python 3.11.6 The error is raised here: pkce_code_verifier == None
resp.json() == {'error': 'invalid_grant', 'error_description': 'Missing code verifier.'} Related configs: SOCIALACCOUNT_PROVIDERS = {
'google': {
'SCOPE': [
'profile',
'email',
],
'AUTH_PARAMS': {
'access_type': 'online',
},
'OAUTH_PKCE_ENABLED': True,
'APP': {
'client_id': '***',
'secret': '***',
},
}
} Not sure if related, but I've found this: simov/grant#199 Since I don't understand the details of the problem (if there is a solution or not), but I also would like to keep my session cookie as |
Hi, I encounter the same issue. Microsoft Graph is impacted as well.
# Cookie and Session
CSRF_COOKIE_SAMESITE = 'Strict'
CSRF_COOKIE_HTTPONLY = False
SESSION_COOKIE_SAMESITE = 'Strict'
SESSION_COOKIE_HTTPONLY = True
if IS_PROD_OR_PREPROD:
CSRF_COOKIE_SECURE = True
SESSION_COOKIE_SECURE = True |
Fixed via 40831dc |
Hi,
I have setup Google and Facebook social sign-in using all-auth using templates (i.e. not DRF, etc). Google login stopped working at some point. After a lot of digging, I have found that when ever I have the following setting
It fails most of the time, on production, with this setting on. The only account I have had success with is a Google Workspace account (non-gmail).
However, taking a hint from #2982, as soon as I remove that setting (it defaults to
Lax
) everything seems to work fine.Facebook provider works fine with or without that setting, which leads to the question: is it possible to get the google provider to work similarly to the way the facebook provider works? It would be great for some sites to have
SESSION_COOKIE_SAMESITE
set toStrict
Many thanks
The text was updated successfully, but these errors were encountered: