Skip to content

Instantly share code, notes, and snippets.

@timbroder
Created July 4, 2012 19:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timbroder/3048955 to your computer and use it in GitHub Desktop.
Save timbroder/3048955 to your computer and use it in GitHub Desktop.
AUTHENTICATION_BACKENDS = (
'social_auth.backends.google.GoogleOAuth2Backend',
# 'social_auth.backends.google.GoogleBackend',
# 'django.contrib.auth.backends.ModelBackend',
)
SOCIAL_AUTH_ENABLED_BACKENDS = ('google-oauth2')
GOOGLE_OAUTH_EXTRA_SCOPE = ['http://www.google.com/m8/feeds', 'http://www.google.com/reader/api/', 'http://www.google.com/reader/atom/', 'https://www.googleapis.com/auth/plus.me']
SOCIAL_AUTH_DEFAULT_USERNAME = 'new_social_auth_user'
SOCIAL_AUTH_UUID_LENGTH = 16
SOCIAL_AUTH_SESSION_EXPIRATION = False
vars()['GOOGLE_OAUTH2_AUTH_EXTRA_ARGUMENTS'] = {'access_type': 'offline', 'approval_prompt': 'auto'}
#SOCIAL_AUTH_SESSION_EXPIRATION = False
SOCIAL_AUTH_ASSOCIATE_BY_MAIL = True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment