Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Connect with Facebook in Django Rest Framework + Django Social Auth

Tags:

I'm using Django Social Auth for connect with Facebook issue and it works perfect. I have developed an API for my Django app with Django Rest Framework. But I'm confused about using Django Social Auth with Django Rest Framework for iOS devices.

I have searched 1, 2, 3 and 4 but they are generally with Angular.js. I'm not familiar with iOS development.

  • What is different between facebook connect with spa and a mobile device? * How could I use these packages together?
  • May I migrate from django-social-auth to python-social-auth?
like image 891
TheNone Avatar asked Apr 02 '14 13:04

TheNone


People also ask

How does Django integrate with Facebook login?

Run Your Django Project.Visit login page in the browser using localhost URL. It will look like this in the browser. Click on Log with Facebook and follow the steps. After log in, you will be redirected to the home page.

Which authentication is best in Django REST framework?

And these are all provided by drf(django rest framework) and other than these like oauth, oauth2 based authentication are provided by the efforts of the community with help of other python packages. And they can be easily used in the production environment.

What is Social Auth app Django?

Python Social Auth - Django Python Social Auth is an easy to setup social authentication/registration mechanism with support for several frameworks and auth providers.


1 Answers

You can now authenticate your users against your django-rest-framework with bearer tokens/third party access tokens from any python-social-auth backend (Facebook, Google, Github, etc.) using this library https://github.com/PhilipGarnero/django-rest-framework-social-oauth2

This module provides a python-social-auth and oauth2 support for django-rest-framework. Thus this saves you a lot of time to setup what is required to have your DRF with social authorization and to be OAuth2 secure.

like image 175
Hugo Sequeira Avatar answered Oct 17 '22 04:10

Hugo Sequeira