Django Social Auth
==================
-Django Social Auth is an easy to setup social authentication/registration
+Django Social Auth is an easy to setup social authentication/authorization
mechanism for Django projects.
Crafted using base code from django-twitter-oauth_ and django-openid-auth_,
at the moment:
* `Google OpenID`_
+ * `Google OAuth`_
* `Yahoo OpenID`_
* OpenId_ like myOpenID_
* `Twitter OAuth`_
- Twitter and Facebook support demands an application registration
on their corresponding sites.
+
------------
Installation
------------
'social_auth.backends.TwitterBackend',
'social_auth.backends.FacebookBackend',
'social_auth.backends.OrkutBackend',
+ 'social_auth.backends.GoogleOAuthBackend',
'social_auth.backends.GoogleBackend',
'social_auth.backends.YahooBackend',
'social_auth.backends.OpenIDBackend',
'django.contrib.auth.backends.ModelBackend',
)
-- Setup Twitter and Facebook keys (see OAuth_ section for details)::
+- Setup Twitter, Facebook, Orkut and Google OAuth keys (see OAuth_ section
+ for details)::
TWITTER_CONSUMER_KEY = ''
TWITTER_CONSUMER_SECRET = ''
FACEBOOK_API_SECRET = ''
ORKUT_CONSUMER_KEY = ''
ORKUT_CONSUMER_SECRET = ''
+ GOOGLE_CONSUMER_KEY = ''
+ GOOGLE_CONSUMER_SECRET = ''
- Setup login URLs::
-----
OAuth_ communication demands a set of keys exchange to validate the client
authenticity prior to user approbation. Twitter, Facebook and Orkut
-facilitates these keys by application registration, see next sections for
-details.
+facilitates these keys by application registration, Google works the same,
+but provides the option for unregisterd applications.
+
+Check next sections for details.
-------
ORKUT_CONSUMER_KEY
ORKUT_CONSUMER_SECRET
+- add any needed extra data to::
+
+ ORKUT_EXTRA_DATA = ''
+
+- configure extra scopes in::
+
+ ORKUT_EXTRA_SCOPES = [...]
+
+
+------------
+Google OAuth
+------------
+Google provides "Consumer Key" and "Consumer Secret" keys to
+registered applications, but also allows unregistered application to
+use their authorization system with, but beware that this method
+will display a security banner to the user telling that the application
+is not trusted.
+
+Check `Google OAuth`_ and make your choice.
+
+- fill "Consumer Key" and "Consumer Secret" values::
+
+ GOOGLE_CONSUMER_KEY
+ GOOGLE_CONSUMER_SECRET
+
+anonymous values will be used if not configured as described in their
+`OAuth reference`_
+
+
+- configure the display name to be used in the "grant permissions" dialog
+ that Google will display to users in::
+
+ GOOGLE_DISPLAY_NAME = ''
+
+ shows 'Social Auth' by default, but that might not suite your application.
+
+- setup any needed extra scope in::
+
+ GOOGLE_OAUTH_EXTRA_SCOPE = [...]
+
+check which Apps are included in their `Google Data Protocol Directory`_
+
----
Bugs
.. _Google support: http://www.google.com/support/a/bin/answer.py?hl=en&answer=162105
.. _Orkut API: http://code.google.com/apis/orkut/docs/rest/developers_guide_protocol.html#Authenticating
.. _Google OpenID: http://code.google.com/apis/accounts/docs/OpenID.html
+.. _Google OAuth: http://code.google.com/apis/accounts/docs/OAuth.html
+.. _Google Data Protocol Directory: http://code.google.com/apis/gdata/docs/directory.html
+.. _OAuth reference: http://code.google.com/apis/accounts/docs/OAuth_ref.html#SigningOAuth
.. _Yahoo OpenID: http://openid.yahoo.com/
.. _Twitter OAuth: http://dev.twitter.com/pages/oauth_faq
.. _Facebook OAuth: http://developers.facebook.com/docs/authentication/