add google to social account providers
authorJan Szejko <janek37@gmail.com>
Mon, 9 Apr 2018 17:00:42 +0000 (19:00 +0200)
committerJan Szejko <janek37@gmail.com>
Mon, 9 Apr 2018 17:00:42 +0000 (19:00 +0200)
src/wolnelektury/settings/__init__.py
src/wolnelektury/settings/auth.py

index 72035d9..ca70e9f 100644 (file)
@@ -99,6 +99,7 @@ INSTALLED_APPS_CONTRIB = [
     'allauth.socialaccount',
     'allauth.socialaccount.providers.openid',
     'allauth.socialaccount.providers.facebook',
     'allauth.socialaccount',
     'allauth.socialaccount.providers.openid',
     'allauth.socialaccount.providers.facebook',
+    'allauth.socialaccount.providers.google',
     # 'allauth.socialaccount.providers.twitter',
     ]
 
     # 'allauth.socialaccount.providers.twitter',
     ]
 
index 79da587..e07581e 100644 (file)
@@ -17,9 +17,34 @@ SOCIALACCOUNT_QUERY_EMAIL = True
 
 SOCIALACCOUNT_PROVIDERS = {
     'openid': {
 
 SOCIALACCOUNT_PROVIDERS = {
     'openid': {
-        'SERVERS': [{
-            'id': 'google',
-            'name': 'Google',
-            'openid_url': 'https://www.google.com/accounts/o8/id'}],
+        'SERVERS': [],
+    },
+    'google': {
+        'AUTH_PARAMS': {
+            'access_type': 'online',
+        }
+    },
+    'facebook': {
+        'METHOD': 'oauth2',
+        'SCOPE': ['email', 'public_profile'],
+        # 'AUTH_PARAMS': {'auth_type': 'reauthenticate'},
+        # 'INIT_PARAMS': {'cookie': True},
+        # 'FIELDS': [
+        #     'id',
+        #     'email',
+        #     'name',
+        #     'first_name',
+        #     'last_name',
+        #     'verified',
+        #     'locale',
+        #     'timezone',
+        #     'link',
+        #     'gender',
+        #     'updated_time',
+        # ],
+        # 'EXCHANGE_TOKEN': True,
+        # 'LOCALE_FUNC': 'path.to.callable',
+        # 'VERIFIED_EMAIL': False,
+        # 'VERSION': 'v2.12',
     },
 }
     },
 }