Check if current user is logged in using any django social auth provider -



Check if current user is logged in using any django social auth provider -

i check if user logged in via social authentication or using django default authentication.

something

if user.social_auth = true?

ok after doing research came solution create sure if user authenticated using social provider or default django auth. check here moreinfo..

{% if user.is_authenticated , not backends.associated %} #do or show if user not authenticated social provider default auth {% elif user.is_authenticated , backends.associated %} #do or show if user authenticated social provider {% else %} #do or show if none of both {% endif %}

django django-socialauth python-social-auth

Comments

Popular posts from this blog

php - How to pass multiple values from url -

database - php search bar when I press submit with nothing in the search bar it shows all the data -

ios - How to load .png images from Documents folder of an app -