Files
dss.api/dss/psa.py
Fergal Moran 2c38baf18a Stuff
2015-11-08 19:17:18 +00:00

39 lines
1.4 KiB
Python
Executable File

from django.conf import global_settings
AUTHENTICATION_BACKENDS = global_settings.AUTHENTICATION_BACKENDS + (
'social.backends.open_id.OpenIdAuth',
'social.backends.google.GoogleOAuth2',
'social.backends.google.GooglePlusAuth',
'social.backends.twitter.TwitterOAuth',
'social.backends.yahoo.YahooOpenId',
'social.backends.facebook.FacebookOAuth2'
)
SOCIAL_AUTH_PIPELINE = (
'social.pipeline.social_auth.social_details',
'social.pipeline.social_auth.social_uid',
'social.pipeline.social_auth.auth_allowed',
'social.pipeline.social_auth.social_user',
'social.pipeline.user.get_username',
'social.pipeline.social_auth.associate_by_email',
'social.pipeline.user.create_user',
'social.pipeline.social_auth.associate_user',
'social.pipeline.social_auth.load_extra_data',
'social.pipeline.user.user_details'
)
#SOCIAL_AUTH_GOOGLE_OAUTH2_USE_DEPRECATED_API = True
#SOCIAL_AUTH_GOOGLE_PLUS_USE_DEPRECATED_API = True
#SOCIAL_AUTH_GOOGLE_OAUTH2_IGNORE_DEFAULT_SCOPE = True
SOCIAL_AUTH_GOOGLE_OAUTH2_SCOPE = [
'https://mail.google.com/',
'https://www.googleapis.com/auth/admin.directory.user.readonly',
'https://www.googleapis.com/auth/admin.directory.orgunit.readonly',
'https://www.googleapis.com/auth/admin.directory.group.readonly',
'https://www.googleapis.com/auth/userinfo.email',
'https://www.googleapis.com/auth/userinfo.profile',
]
SOCIAL_AUTH_FACEBOOK_SCOPE = ['email']