Source

django-xauth /

Filename Size Date modified Message
demo
xauth
167 B
38 B
47 B
1.9 KB
84 B
121 B
1.8 KB

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

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
  • 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