Django-allauth with SSL: "DoNotExist at / accounts / google / login / callback /"

I am testing my django app (1.6.5) on localhost. I am using django-allauth and without ssl everything is fine.

I installed django-sslserver and changed the following:

Settings.py

ACCOUNT_DEFAULT_HTTP_PROTOCOL = 'https'    # allauth

SESSION_COOKIE_SECURE = True
CSRF_COOKIE_SECURE = True
os.environ['HTTPS'] = "on"

      

Api Google Console

REDIRECT URIS : http://localhost:8000/accounts/google/login/callback/
                https://localhost:8000/accounts/google/login/callback/

      

When I logged in with my google account, I accepted authorization, but when it is redirected back to my application, an error message appears:

DoesNotExist at /accounts/google/login/callback/
User matching query does not exist.
Request URL:    https://localhost:8000/accounts/google/login/callback/?state=PwKj3DsvzmNp&code=4/16ttwvGn7SIZKyHWZ9sSy8YOx7sg.4t9M4AcGcoEfoiIBeO6P2m9E6KmpkAI

allauth/socialaccount/helpers.py in _login_social_account

def _login_social_account(request, sociallogin):
**return perform_login(request, sociallogin.account.user, ...**
                     email_verification=app_settings.EMAIL_VERIFICATION,
                     redirect_url=sociallogin.get_redirect_url(request),
                     signal_kwargs={"sociallogin": sociallogin})

      

Return line error. Could you help me? Thank you! :)

+3
django ssl django-allauth


source to share


No one has answered this question yet

Check out similar questions:

3
django-allauth Social network malfunction with Facebook and Google
2
django-allauth redirects back to registration / registration forms
1
Django-allauth with StackExchange: how to install it?
1
Django Allauth and Google
1
Django allauth social accounts not showing in template
1
django allauth redirect to home url
1
Django-allauth 0.8.1 Twitter Integration
0
Django 2.0 + django-allauth: RelatedObjectDoesNotExist at / account / edit / (User has no profile)
0
How to redirect user to login page after logout in django / allauth?
0
Social login error while checking Gmail



All Articles
Loading...
X
Show
Funny
Dev
Pics