Giter Club home page Giter Club logo

django-oauth2-fb-provider's Introduction

django-oauth2-fb-provider

Forked from django-oauth2-provider

This fork allows you to get access token by "facebook login".

Requirements:

  • python-social-auth>=0.1.26

  • Django>=1.6

Getting started:

Important: uninstall original django-oauth2-provider

Install by pip:

pip install -e git://github.com/johniak/django-oauth2-fb-provider.git#egg=django-oauth2-fb-provider

Add and configure python-social-auth to your project.

Add apps to django (names same as in original according to compatibility):

INSTALLED_APPS = (...
'provider',
'provider.oauth2',
}

Add urls:

url(r'^oauth2/', include('provider.oauth2.urls', namespace='oauth2'))

Go to the admin panel and create a new Provider.Client entry. It will create the client_id and client_secret properties for you.

Now you can get acces_token by url:

/oauth2/access_token/

Parameters are:

  • uid - facebook user id
  • access_token - facebook api access_token
  • grant_type - facebook
  • client_id - same as in original
  • client_secret - same as in original

Example request:

curl -X POST -d "client_id=CLIENT_ID&client_secret=CLIENT_SECRET&grant_type=facebook&uid=FACEBOOK_UID&access_token=FACEBOOK_ACCESS_TOKEN

Help

Documentation of original

Help of original

License

django-oauth2-fb-provider is released under the MIT License. Please see the LICENSE file for details.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.