Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Provides federated login (SSO) to Django projects

Project Description

This project is currently unmaintained. Not recommended for production use.

Django Federated Login

Django Federated Login provides an authentication bridge between Django projects and OpenID-enabled identity providers. The bridge is pre-wired to be used with a single Google Apps domain, but could be extended to be linked with other OpenID providers also. It is different from other OpenID consumers as this consumer only allows connecting to a pre-defined identity provider.

The provided backend matches users based on the e-mail address returned from the identity provider. If no matching user could be found, a user account can optionally be created.

I would love to hear your feedback on this package. If you run into problems, please file an issue on GitHub, or contribute to the project by forking the repository and sending some pull requests.

Compatible with Django 1.4, 1.5 and 1.6 on Python 2.6, 2.7, 3.2 and 3.3. Python 3 is supported through the python3-openid fork.


Installation with pip:

$ pip install django-federated-login

Add 'federated_login.auth_backend.EmailBackend' as authentication backend:

Add 'federated_login' as installed app:

Provide the Google Apps domain to identify against:

For Django 1.6, need to configure session serializer:
SESSION_SERIALIZER = 'django.contrib.sessions.serializers.PickleSerializer'

Register the views:
url(r'^federated/', include('federated_login.urls')),

Sync or migrate your database:

python syncdb
# or if you use South:
python migrate federated_login


Point your browser to /federated/login/. You might want to include a button to this url on the regular login page. You could also use the federated login page as the default login page, replacing the username and password login pages. To do this, configure the LOGIN_ settings:
LOGIN_URL = '/federated/login/'


These are the customizable settings:

Google Apps domain to identify against. Can be overriden by FL_SSO_ENDPOINT.
FL_USER_FACTORY (Default: 'federated_login.user_factories.normal')
Function that is called when creating a user account. Set to None to disable creation of new users. There is also 'federated_login.user_factories.staff' that creates staff users and 'federated_login.user_factories.superuser' that creates superusers.
FL_SSO_ENDPOINT (Default: Google Apps)
Override this setting to link with another OpenID identity provider. The FL_APPS_DOMAIN setting will have no effect when providing a custom FL_SSO_ENDPOINT.
FL_USER_CLASS (Default: 'django.contrib.auth.models.User')
Django model class to used to create and query for users.
FL_PATCH_ADMIN (Default: True)
Django’s admin site is automatically patched to use federated login. Set this setting to False to disable this feature. You can call federated_login.admin.patch_admin() and federated_login.admin.unpatch_admin() to respectively patch and unpatch the admin site.
Release History

Release History

This version
History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django-federated-login-1.0.0.tar.gz (14.5 kB) Copy SHA256 Checksum SHA256 Source Mar 23, 2014

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