Open vovkd opened 7 years ago
Please help me, I have the same error. Everything was working before but now user redirects to login page again. here is my website https://thepoet.me I have created another app on facebook and it is working good on localhost.
Did anyone find a solution to this issue?
For me problem was in another part of the system
Same issue. Any updates?
I've managed to pinpoint it to a Key Error for '_auth_user_id' in the get_user
method in my virtualenv's django/contrib/auth/init.py from _get_user_session_key(request)
. Anyone know how to bypass the KeyError / not get an auth_user_id error? Thanks!
Fixed by changing is_active in my User model to default to True rather than False--thinking Django itself updated something
I just went into /admin and deleted the user and then it started working again.
Did anyone find a solution to this issue?
Hey guys, I recommend using django-allauth. Here is a quick tutorial to help you guys: https://www.youtube.com/watch?v=ZTBexYIIOP8
Hi Guys, social-auth-login was working fine.But suddenly it does not. It redirects user to login page after all authentication and creation process user creation, retrieve tokens and save extra data on server. While it is working fine on local.And onserver gmail gives warning that website is insecure while on local it does not.
Can anyone please help...
Fixed by changing is_active in my User model to default to True rather than False--thinking Django itself updated something
Hi tiffanyqi, i also tried this but not working.And other suggestion ?
TLDR; I had a typo in my AUTHENTICATION_BACKENDS
.
I went through the login flow for google and it looked like nothing happened (worked great with github). I then loaded the session in the command line and it looked like the user was logged in. I eventually realized the session's authentication back end didn't match any of the entries in settings.AUTHENTICATION_BACKENDS
, which means the session thought the user was logged in, but django was ignoring it. Fixing the typo fixed it.
i solved this , doing the next.
First check your login {% url 'social:begin' 'google-oauth2' %}
remove if you have ?next={{ request.path }}
dont use at the same time
SOCIAL_AUTH_LOGIN_REDIRECT_URL='' LOGIN_REDIRECT_URL
just one of these..
add a path('/{your_url}')
i hope, this help to you
For some reason social started redirect to login page even after authorization (user created, access code and refresh_token retrived). It worked perfectly and then just started redirect all new users back to login page, so they can't login