Source

django-xauth / README

Full commit
Django-xauth application
========================

Django-xauth is django application which is all-in-one solution for registration
on the site via different 3rd part services like openid, oauth, etc. Xauth consists of
services. For now only openid and oauth is available. Each service enables your users to
use a number of popular websites. Openid service allows to use google, yandex, yahoo, etc.
Oauth allows to use twitter, vkontakte, etc.


Dependencies
============
* Django >= 1.3
* openid service depends on python-openid
* oauth1 service depends on http://github.com/simplegeo/python-oauth2
* oauth2 service depends on http://github.com/ryanhorn/tyoiOAuth2.git


Installation (read carefully)
=============================

* Install django-xauth package using pip or easy_install (anyway for now it is better use recent version
  from the bitbucket)
* Install dependencies
* Put "xauth" into INSTALLED_APPS
* Put "xauth.backends.XauthBackend" into AUTHENTICATION_BACKENDS::

    AUTHENTICATION_BACKENDS = (
        'django.contrib.auth.backends.ModelBackend',
        'xauth.backends.XauthBackend',
    )

* Put "from xauth.settings import *" in your settings.py to import default xauth settings
* Put "url(r'^auth/', include('xauth.urls'))" into urls.py
* Run syncdb
* Enable "django.contrib.messages"


Demo
====

Check out the "demo/" directory in the source code repo. It is the django project which demonstrates usage of django-xauth. Is shows particularly how to use own Profile Form and how to control profile fields which is requested via Sreg/AX Openid extensions.


Configuration
=============

For oauth1 service supports only twitter and oauth2 supports only facebook & vkontakte.

For twitter you should specify following settings:
 * XAUTH_OAUTH1_TWITTER_CONSUMER_KEY
 * XAUTH_OAUTH1_TWITTER_CONSUMER_SECRET
For facebook you should define:
 * XAUTH_OAUTH2_FACEBOOK_CLIENT_ID
 * XAUTH_OAUTH2_FACEBOOK_CLIENT_SECRET
For vkontakte:
 * XAUTH_OAUTH2_VKONTAKTE_CLIENT_ID
 * XAUTH_OAUTH2_VKONTAKTE_CLIENT_SECRET