At first this seems simple enough, allow users to register for your site using one of their existing accounts at popular sites like Facebook, Twitter, Google, Yahoo! and Hotmail (Live). Then you realize that each one has a slightly different oauth implementation, the documentation is not that great, their SDK is out-of-date (looking at you Yahoo), various tutorials on the web are incomplete / out-of-date / simply wrong, or the existing packages provide more functionality than you need (i.e. you’ve already got a user management framework in place).
Over the next couple of posts I will look at getting each one of these up and running. But first, you’ll need to register your application with each provider:
Facebook
https://developers.facebook.com/apps
Twitter
https://dev.twitter.com/apps
Google
https://code.google.com/apis/console/
Yahoo!
https://developer.apps.yahoo.com/projects
Microsoft
http://msdn.microsoft.com/en-us/live/
Once you’ve got all that filled out, add the following to your settings file with their respective values:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TWITTER_CONSUMER_KEY = '' | |
TWITTER_CONSUMER_SECRET = '' | |
FACEBOOK_APP_ID = '' | |
FACEBOOK_API_SECRET = '' | |
GOOGLE_OAUTH2_CLIENT_ID = '' | |
GOOGLE_OAUTH2_CLIENT_SECRET = '' | |
MICROSOFT_CLIENT_ID = '' | |
MICROSOFT_CLIENT_SECRET = '' | |
YAHOO_CONSUMER_KEY = '' | |
YAHOO_CONSUMER_SECRET = '' |
UPDATE… links to all articles…
Facebook – https://chriskief.com/2012/12/22/django-register-with-oauth-facebook/
Twitter – https://chriskief.com/2012/12/22/django-register-with-oauth-twitter/
Google – https://chriskief.com/2012/12/22/django-register-with-oauth-google/
Yahoo! – https://chriskief.com/2012/12/30/django-register-with-oauth-yahoo/
Microsoft – https://chriskief.com/2013/01/05/register-with-oauth-microsoft-live/