X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/ae60b2a3949e96357477cc04f90fd0873cee8a92..db85a925446ab8082ead1e84d13d2fcf57603e83:/src/wolnelektury/settings/auth.py diff --git a/src/wolnelektury/settings/auth.py b/src/wolnelektury/settings/auth.py index d1c6a8f4e..0acfa9041 100644 --- a/src/wolnelektury/settings/auth.py +++ b/src/wolnelektury/settings/auth.py @@ -1,12 +1,14 @@ -# -*- 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', + #'django.contrib.auth.backends.ModelBackend', 'allauth.account.auth_backends.AuthenticationBackend', ] ACCOUNT_EMAIL_CONFIRMATION_EXPIRE_DAYS = 2 +ACCOUNT_LOGIN_METHODS = {'email', 'username'} +FEATURE_CONFIRM_USER = False + LOGIN_URL = '/uzytkownik/login/' LOGIN_REDIRECT_URL = '/' @@ -17,9 +19,15 @@ 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'], }, }