I've been using python-social-auth
for a few weeks in a Django project. Now I am reaching the point where I need to authenticate a user from a view (that is, not through the template tags such as social:begin
) and the documentation makes use of the psa()
decorator from social.apps.django_app.utils
.
I was not able to find anything that clearly explains what the psa
decorator is supposed to do and the source from omab/python-social-auth does not provide any comment.
Can anyone explain:
- What is the
psa
decorator supposed to do exactly? - What happens behind the scene when I use it to authenticate a user based on the access token retrieved by the front-end (possibly from any social network such as Facebook)?