python-social-auth

Pass data from the pipeline to views in Django Python Social Auth

Pass data from the pipeline to views in Django Python Social Auth Question: I was reading the documentation of Python Social Auth and got curious about the section of Interrupting the Pipeline (and communicating with views). In there, we see the following pipeline code In our pipeline code, we would have: from django.shortcuts import redirect …

Total answers: 1

Extend social pipeline and prevent a specific function to run during tests

Extend social pipeline and prevent a specific function to run during tests Question: I’m using Python Django Social Auth and extended the pipeline with the following three steps One before the user is created (partial pipeline) requesting some data. One for the user creation (overrides the social.pipeline.user.create_user method). One after the user is created. Here’s …

Total answers: 1

ModuleNotFoundError: No module named 'jose'

ModuleNotFoundError: No module named 'jose' Question: I am using python-social-auth in my django project to use social platforms for authentication in my project. It all worked well but am getting this error ModuleNotFoundError: No module named ‘jose’ This is the whole error: [05/Apr/2020 14:01:00] “GET /accounts/login/ HTTP/1.1” 200 3058 Internal Server Error: /login/twitter/ Traceback (most …

Total answers: 4

How can I display a meaningful login error messages to user within python-social-auth?

How can I display a meaningful login error messages to user within python-social-auth? Question: I am using python-social-auth with Django 1.6 and things are working well. I defined SOCIAL_AUTH_LOGIN_ERROR_URL to point to a view I have within my app to show an error to the user when the login does not go as planned. My …

Total answers: 3

How can I use Django OAuth Toolkit with Python Social Auth?

How can I use Django OAuth Toolkit with Python Social Auth? Question: I’m building an API using Django Rest Framework. Later this API is supposed to be consumed by iOS and Android devices. I want to allow my users to sign-up with oauth2-providers like Facebook and Google. In this case, they shouldn’t have to create …

Total answers: 4

python-social-auth AuthCanceled exception

python-social-auth AuthCanceled exception Question: I’m using python-social-auth in my Django application for authentication via Facebook. But when a user tries to login, they have been redirected to the Facebook app page, and they click on the "Cancel" button, the following exception appears: ERROR 2014-01-03 15:32:15,308 base :: Internal Server Error: /complete/facebook/ Traceback (most recent call …

Total answers: 7

Python Social Auth NotAllowedToDisconnect at /disconnect/facebook/1/

Python Social Auth NotAllowedToDisconnect at /disconnect/facebook/1/ Question: I’m trying to use logout with Python Social Auth in a Django app, but I’m getting NotAllowedToDisconnect at /disconnect/facebook/1/ These are my settings: SOCIAL_AUTH_PIPELINE = ( ‘social.pipeline.social_auth.social_details’, ‘social.pipeline.social_auth.social_uid’, ‘social.pipeline.social_auth.auth_allowed’, ‘social.pipeline.social_auth.social_user’, ‘social.pipeline.user.get_username’, ‘social.pipeline.mail.mail_validation’, ‘social.pipeline.user.create_user’, ‘social.pipeline.social_auth.associate_user’, ‘social.pipeline.social_auth.load_extra_data’, ‘social.pipeline.user.user_details’ ) SOCIAL_AUTH_DISCONNECT_PIPELINE = ( ‘social.pipeline.disconnect.allowed_to_disconnect’, ‘social.pipeline.disconnect.get_entries’, ‘social.pipeline.disconnect.revoke_tokens’, ‘social.pipeline.disconnect.disconnect’ ) And this is …

Total answers: 1

Django unit test; Login using python-social-auth

Django unit test; Login using python-social-auth Question: I would like to write unit tests for my Django app that is using python-social-auth. It all works great when running Django and using a browser, thanks python-social-auth! However, I can’t seem to write unit tests because I can’t create an authenticated client to test with. Has anyone …

Total answers: 3