X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/ae60b2a3949e96357477cc04f90fd0873cee8a92..1615a0292722f1fbbbc67a77362b40a023fdebb9:/src/wolnelektury/settings/auth.py?ds=sidebyside diff --git a/src/wolnelektury/settings/auth.py b/src/wolnelektury/settings/auth.py index d1c6a8f4e..e704dc611 100644 --- a/src/wolnelektury/settings/auth.py +++ b/src/wolnelektury/settings/auth.py @@ -4,10 +4,10 @@ # AUTHENTICATION_BACKENDS = [ 'django.contrib.auth.backends.ModelBackend', - 'allauth.account.auth_backends.AuthenticationBackend', + # 'allauth.account.auth_backends.AuthenticationBackend', ] ACCOUNT_EMAIL_CONFIRMATION_EXPIRE_DAYS = 2 -LOGIN_URL = '/uzytkownik/login/' +LOGIN_URL = '/uzytkownik/zaloguj-utworz/' LOGIN_REDIRECT_URL = '/' @@ -17,9 +17,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', }, }