python-social-auth

Facebook Auth with AngularJS and Django REST Framework

亡梦爱人 提交于 2019-12-03 02:44:42
问题 I am developing a SPA application with AngularJS which uses Django backend for the server. The way that I communicate with the server from the SPA is with django-rest-framework. So now I want to make authentication with facebook (google and twitter too) and I read a lot on this topic and found OAuth.io which is making the authetication on the client SPA side and python-social-auth which is doing the same thing but on the server side. So currently I have only the client auth, my app is

On upgrading python-social-auth from 0.1.17 to 0.2.4, session attribute is not provided in request, to custom pipeline method?

☆樱花仙子☆ 提交于 2019-12-02 23:35:05
问题 My social-auth pipeline is as follows: 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.social_auth.associate_by_email', 'social.pipeline.user.create_user', 'social.pipeline.social_auth.associate_user', 'social.pipeline.social_auth.load_extra_data', 'social.pipeline.user.user_details',

Are sessions needed for python-social-auth

你离开我真会死。 提交于 2019-12-02 17:15:22
I'm building a django app with an API backend(built with DRF) and angularjs client. My goal is to completely decouple the server and client using JWT in place of sessions. I'm attempting to integrate python-social-auth (PSA) with django-rest-framework-jwt (DRFJWT), so my goal is to have an auth flow something to this: User logs with Email/facebook via angular client -> client posts form to PSA's url -> PSA login/create user ->[!] DRFJWT creates token that it then sends back to client -> client stores token in local storage then uses token each request [!]: This is currently where I'm

Facebook Auth with AngularJS and Django REST Framework

走远了吗. 提交于 2019-12-02 16:38:37
I am developing a SPA application with AngularJS which uses Django backend for the server. The way that I communicate with the server from the SPA is with django-rest-framework . So now I want to make authentication with facebook (google and twitter too) and I read a lot on this topic and found OAuth.io which is making the authetication on the client SPA side and python-social-auth which is doing the same thing but on the server side. So currently I have only the client auth, my app is connecting to facebook (with OAuth.io) and login successfully. This process is returning access_token and

On upgrading python-social-auth from 0.1.17 to 0.2.4, session attribute is not provided in request, to custom pipeline method?

限于喜欢 提交于 2019-12-02 11:05:13
My social-auth pipeline is as follows: 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.social_auth.associate_by_email', 'social.pipeline.user.create_user', 'social.pipeline.social_auth.associate_user', 'social.pipeline.social_auth.load_extra_data', 'social.pipeline.user.user_details', 'useraccounts.models.create_user_profile' ) When 'useraccounts.models.create_user_profile' does following:

python-social-auth + mobile app

对着背影说爱祢 提交于 2019-12-01 09:40:17
I have a django app and I create API for mobile app. When it comes to user authentication I simple gets login + pass and do standard django login stuff. When user is logged in I generate a token, save it and provide to the mobile app. Now it comes to Facebook and I would like to implement python-social-auth library. I do know how to implement it for standard web, it's really trivial. But I have no idea, how to implement it into my mobile API and how to incorporate there my token stuff. Just thinking... Is there a possibility to do programatical auth so I would be able to create API method and

Get Facebook user likes in Python Social Auth

旧城冷巷雨未停 提交于 2019-12-01 01:08:43
I'm starting a project with Django and I'm trying to allow users log in with Facebook. For the site purposes, I want to store the user likes in my database. I took as an example the example app on Python Social Auth (the library I'm using for the project) and I've written a pipeline for storing data in DB. The problem comes when I try to access likes, because the data that the response I get just gives me the basic data, so the following code doesn't work. def user_details(strategy, details, response, user=None, *args, **kwargs): attrs = {'user': user} if strategy.backend.__class__.__name__ ==

How to solve Authentication process canceled error?

北慕城南 提交于 2019-11-30 20:37:33
Now I try to setup python-social-app In facebook login after the username/password redirect to error page I don't know why this happen... In my setting I have 'social.backends.facebook.FacebookOAuth2' and I correctly set SOCIAL_AUTH_FACEBOOK_KEY and Secret so Really where to look the error.? Traceback Environment: Request Method: GET Request URL: http://website.com:8000/complete/facebook/?redirect_state=IuQDEiyX2bbS8Uhk7MR3hpRFLNZlW2Y5&code=AQDH5kqBibfy9bi21M9tTieujRAqvJVYdAb2UPFvfH6DVXoCWrrtamRA99Ze5-6cC6qHPiNq-a3XbGh2Gg4pbdFfM4OTpCEpWkPID6SZrHfAoEan8Q68cV17LDgsryX_M45QoXd0knpbE0x

Get Facebook user likes in Python Social Auth

徘徊边缘 提交于 2019-11-30 20:24:34
问题 I'm starting a project with Django and I'm trying to allow users log in with Facebook. For the site purposes, I want to store the user likes in my database. I took as an example the example app on Python Social Auth (the library I'm using for the project) and I've written a pipeline for storing data in DB. The problem comes when I try to access likes, because the data that the response I get just gives me the basic data, so the following code doesn't work. def user_details(strategy, details,

How to solve Authentication process canceled error?

醉酒当歌 提交于 2019-11-30 05:18:26
问题 Now I try to setup python-social-app In facebook login after the username/password redirect to error page I don't know why this happen... In my setting I have 'social.backends.facebook.FacebookOAuth2' and I correctly set SOCIAL_AUTH_FACEBOOK_KEY and Secret so Really where to look the error.? Traceback Environment: Request Method: GET Request URL: http://website.com:8000/complete/facebook/?redirect_state=IuQDEiyX2bbS8Uhk7MR3hpRFLNZlW2Y5&code