X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/5ab80aae5a42a5c6287dc0f50a90dc5a94ee5665..49fd68327eee961b167b0dbbb80e99d6295afe10:/src/wolnelektury/settings/auth.py?ds=sidebyside diff --git a/src/wolnelektury/settings/auth.py b/src/wolnelektury/settings/auth.py index 79da587e0..372490f16 100644 --- a/src/wolnelektury/settings/auth.py +++ b/src/wolnelektury/settings/auth.py @@ -1,6 +1,5 @@ -# -*- coding: utf-8 -*- -# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later. -# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# This file is part of Wolne Lektury, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Wolne Lektury. See NOTICE for more information. # AUTHENTICATION_BACKENDS = [ 'django.contrib.auth.backends.ModelBackend', @@ -17,9 +16,34 @@ SOCIALACCOUNT_QUERY_EMAIL = True 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', }, }