This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

A stable Facebook authentication backend for Django >= 1.4.

Starting from version 3.6.0 Django 1.7 is supported. South migrations are move to south_migrations so you need South 1.0 or newer to use them.

Requires Celery for background token operations.



django-facebook-auth can be installed as a normal Python package.

Example installation for pip:

$ pip install django-facebook-auth



This project requires working Celery integration. In case you are new to Celery, the First steps with Django tutorial will help you to hit the ground running.

Set USE_TZ = True

Add facebook_auth to INSTALLED_APPS:


Add authentication backends to AUTHENTICATION_BACKENDS:


Set necessary Facebook properties:

FACEBOOK_CANVAS_URL = ''  # root of your domain
FACEBOOK_APP_ID = '1234567890'
FACEBOOK_APP_SECRET = '91162629d258a876ee994e9233b2ad87'


The authentication flow is very straightforward:

  1. Redirect your user to Facebook OAuth endpoint using redirect_uri prepared with the help of this library.

    First in your view or context processor prepare the necessary parameters for the Facebook OAuth endpoint:

    from facebook_auth.urls import redirect_uri
    def login(request):
            'redirect_uri': redirect_uri('/login/success', '/login/fail'),
            'client_id': settings.FACEBOOK_APP_ID,
            'scope': 'email'

    And embed the link in your template:

    <a href="{{ client_id }}&amp;scope={{ scope }}&amp;redirect_uri={{ redirect_uri }}">Login using Facebook</a>
  2. User is redirected back to django-facebook-auth authentication handler, which either authenticates the user or refuses to do so.

    Prepare a separate view for each scenario.

  3. A best token for authenticated user is negotiated with Facebook in the background, using your Celery worker.

Release History

Release History

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django-facebook-auth-tmp- (18.6 kB) Copy SHA256 Checksum SHA256 Source Sep 30, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting