Python Forum

Full Version: Django. How to know from where users authorized.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm using social-auth-django for a registration through social networks. I need to knew from where an user authorized. Twitter or Google or Facebook etc. How can I do it! 
https://github.com/python-social-auth/so...ews.py#L42 Wrote:
def _do_login(backend, user, social_user):
    user.backend = '{0}.{1}'.format(backend.__module__,
                                 backend.__class__.__name__)
    login(backend.strategy.request, user)

What's the user.backend look like?  Could that be what you're looking for?