User.is_authenticated is always false in Django

542 views
Skip to first unread message

Jeff Rodenburg

unread,
Nov 24, 2013, 3:29:58 PM11/24/13
to python-so...@googlegroups.com
Just trying this package after using django-social-auth with much success. Authentication routines through providers seem to be functioning correctly, but the Django user is always Anonymous (us_authenticated = false.)

Are additional steps needed with python-social-auth to set the Django request user's authentication state?

Jeff Rodenburg

unread,
Nov 24, 2013, 5:43:43 PM11/24/13
to python-so...@googlegroups.com
Further reading, it appears there are other configuration settings necessary.

Some feedback here: the documentation is sporadic, inconsistent and lacking. Statements like "almost all settings...." are pointless in technical documentation. Getting to a useful state with Django takes way too much time, when the solution is a simple set of required configuration.

Please update the docs.

Matías Aguirre

unread,
Nov 24, 2013, 6:59:28 PM11/24/13
to Jeff Rodenburg, python-social-auth
Please, point what's wrong and needs improving.

Excerpts from Jeff Rodenburg's message of 2013-11-24 20:43:43 -0200:
--
Matías Aguirre (matias...@gmail.com)

Save Patruno

unread,
Aug 25, 2014, 12:45:29 PM8/25/14
to python-so...@googlegroups.com
Hi Jeff, try this:

user.backend = '{0}.{1}'.format(backend.__module__, backend.__class__.__name__)
login(backend.strategy.request, user)

at the end of the pipeline i've added a function that make login.

For an example:
https://github.com/omab/python-social-auth/blob/master/social/apps/django_app/views.py
Reply all
Reply to author
Forward
0 new messages