python,django,python-social-auth
I had this issue for several times too. From the documentation we know that: AuthStateForbidden - The state parameter returned by the server is not the one sent class AuthStateForbidden(AuthException): """State parameter is incorrect.""" def __str__(self): return 'Wrong state parameter given.' I have searched for any kind of the solution...
python,django,python-social-auth
Try this SOCIAL_AUTH_DISCONNECT_PIPELINE = ( 'social.pipeline.disconnect.allowed_to_disconnect', 'social.pipeline.disconnect.get_entries', 'social.pipeline.disconnect.revoke_tokens', # 'social.pipeline.disconnect.disconnect', # comment 'profiles.utils.custom_pipeline', ) custom_pipeline.py def disconnect(strategy, entries, user_storage, *args, **kwargs): for entry in entries: user_storage.disconnect(entry) backend = kwargs.get('name') profile=Profiles.objects.get(user=entries[0].user) if backend == 'facebook': profile.fb_id = ''...
As was suggested by @Wolph it is better to change the redirect uri within my instagram developer account to match the endpoint of python social auth. So, http://localhost:8000/complete/instagram helped....
django,oauth-2.0,django-rest-framework,python-social-auth
I've done something very similar to this before with other OAuth plugins for Django REST Framework, and it should be relatively easily once you understand how the authentication flow has to work. However, the following doesn't work since there is no corresponding authentication scheme for Django REST Framework and the...
django,facebook,python-social-auth
As omab pointed out, working code is 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.social_auth.associate_user', 'social.pipeline.social_auth.load_extra_data', 'social.pipeline.user.user_details' )` ...
django,authentication,python-social-auth
You can keep your pipeline that flags the user as disabled, but also define this setting SOCIAL_AUTH_INACTIVE_USER_URL = "/wait-for-activation" (point it to the URL that shows the "wait for activation" page).
python,django,django-socialauth,python-social-auth
All you need is to replace social.pipeline.user.get_username from SOCIAL_AUTH_PIPELINE with path to your own function returning generated username. For example: project/myapp/settings.py 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', 'project.myapp.utils.get_username', 'social.pipeline.social_auth.associate_by_email', 'social.pipeline.user.create_user',...
The last changes in the repository changed the importance of the strategy, instead of being the main entity to perform the authentication, it's just a helper class to glue the framework with the backends. Try with this snippet to load the strategy and the backend: from social.apps.django_app.utils import load_strategy, load_backend...
django,linkedin,django-socialauth,python-social-auth
Figured it out. After you've retrieved the dictionary "details" from linked in, you can retrieve current companies with: current_companies = [position['company']['name'] for position in details['positions']['position'] if position['is-current']=='true'] ...
django,facebook,python-social-auth
I figured it out, since i was using python3 i should of used list() on my dict values like so: attrs = dict(list(attrs.items()) + list(fb_data.items())) Also instead of saving the image in the database it was best just to save the url, saving alot of space...
Add the user_location scope to the SOCIAL_AUTH_FACEBOOK_SCOPE setting Get the location by doing response['location'] in a pipeline (users that didn't fill their location in their profile won't have that key, so check for it first) ...
python,django,github,python-social-auth
This library uses OAuth for GitHub authentication. You must provide a callback URL, because the OAuth process causes the user's browser to actually leave your site as part of the authentication process. The callback URL that you send to GitHub is used to redirect users back to your site. It...
python,regex,django,google-oauth,python-social-auth
You need a pipeline function for that, something simple as this should do the trick: from social.exceptions import AuthForbidden def email_check(strategy, details, *args, **kwargs): if not is_valid_email(details.get(email)): raise AuthForbidden(strategy.backend) Then stick this function after 'social.pipeline.social_auth.auth_allowed', entry, like this: SOCIAL_AUTH_PIPELINE = ( 'social.pipeline.social_auth.social_details', 'social.pipeline.social_auth.social_uid', 'social.pipeline.social_auth.auth_allowed', 'import.path.to.email_check',...
python,django,python-social-auth
I've figured out myself. Just add the following line to settings.py: SOCIAL_AUTH_FIELDS_STORED_IN_SESSION = ('tgtid', ) ...
python,django,rest,django-rest-framework,python-social-auth
If it's not too late then why not use https://github.com/pennersr/django-allauth and https://github.com/Tivix/django-rest-auth which are designed to work together and simplify API based (social)login / logout / password reset token / password reset from token etc flows.
django,linkedin,python-social-auth,linkedin-jsapi
Access to r_fullprofile requires that you apply for and are granted access to this information from LinkedIn. These profile fields are only available to applications that have applied and been approved for the Apply with LinkedIn use case. Member profile fields The following selection of profile fields are available to...
Found this in the docs silly of me not to realize that they would have different request parameters: http://psa.matiasaguirre.net/docs/backends/index.html
Using zzzeek's solution linked above, I created a self-referential M2M relationship by using a select statement as the "secondary" argument to relationship(). friendship_union = select([ FacebookFriendship.dater_id, cast(FacebookFriendship.fb_uid_friend, Integer()).label( 'fb_uid_friend') ]).union( select([ cast(FacebookFriendship.fb_uid_friend, Integer()), FacebookFriendship.dater_id] ) ).alias() cls.all_fb_friendships = relationship( UserSocialAuth, secondary=friendship_union, primaryjoin=UserSocialAuth.user_id ==...
python,django,oauth-2.0,spotify,python-social-auth
I've read through relevant parts of PSA's source code but I do not understand how this 'state' parameter gets passed around between Spotify and the app. When using the Authorization Code flow or Implicit Grant flow in oAuth 2.0, an optional state value can be appended to the authorize...
django,django-socialauth,python-social-auth
django-social-auth has been deprecated in favor of python-social-auth. It even says this in the django-social-auth README. python-social-auth was built using django-social-auth as a foundation. The main advantage/difference is that it now supports multiple frameworks....
django,python-2.7,django-socialauth,google-login,python-social-auth
I finally figured it out myself. According to this article in the Android's Google Plus documentation, I also need to request the plus.profile.emails.read scope when making the request in the Android app. Once I added this, the python-social-auth code managed to store the email properly in the uid fields. This...
django,authentication,python-social-auth
Thanks for comments and suggestions. I realized how to resolve my problem, and this is my solution, hope it helps to others. The first problem is that PSA uses the same pipeline for both: registering new users and login existing ones. So, it's mandatory differentiate one pipeline flow form the...
django,facebook,facebook-oauth,python-social-auth
This bug was described as Issue #190 on the python-social-auth Github page. Please see this thread for possible workarounds.
django,python-2.7,python-social-auth
While it is not possible to have 2 different pipelines, you can certainly make use of the capabilities to extend the pipeline to consider both the "log in" and "registration" scenarios. After the default pipeline function social.pipeline.social_auth.social_user, all subsequent functions have access to the is_new parameter, which is False if...
javascript,python,django,twitter-bootstrap,python-social-auth
You solved the opening-in-a-popup part already, the closing is the tricky one, for that you need to serve some page with the needed JS code to close the popup and then trigger the reload in the parent window. To make that possible, just define the setting SOCIAL_AUTH_LOGIN_REDIRECT_URL = '/page/that/servers/the/js' and...
django,oauth-2.0,linkedin,python-social-auth
There's a discussion about this issue on the LinkedIn forums. Apparently this can happen if you move from OAuth1 to OAuth2. The proposed remedy until they resolve the problem is to create a new authentication key for our applications....
python,django,oauth,oauth-2.0,python-social-auth
I would try to approach this problem by using django.contrib.auth.models.Group and django.contrib.auth.models.Permission. Create one general group with custom permissions to your apps' functionality and add all your normal users to that. Save accounts created by python-social-auth in default django.contrib.auth.models.User but create seperate Group without any permissions for them. If necessary...
django,email,vk,python-social-auth
I have just found how to fix it: https://github.com/omab/python-social-auth/pull/267 This fix will be added to pip distrib after 0.1.23 ...