X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/357027375ff8867f42ca34bcbfb5a78b5b185fc3..b09ddc60e118508d96906f26ecb0e1709ca89f1b:/src/wolnelektury/settings/auth.py diff --git a/src/wolnelektury/settings/auth.py b/src/wolnelektury/settings/auth.py index 4d3ea224a..2fe844c6e 100644 --- a/src/wolnelektury/settings/auth.py +++ b/src/wolnelektury/settings/auth.py @@ -1,8 +1,14 @@ +# 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_AUTHENTICATION_METHOD = "username_email" +FEATURE_CONFIRM_USER = False + LOGIN_URL = '/uzytkownik/login/' LOGIN_REDIRECT_URL = '/' @@ -11,9 +17,17 @@ SOCIALACCOUNT_AUTO_SIGNUP = False SOCIALACCOUNT_QUERY_EMAIL = True -SOCIALACCOUNT_PROVIDERS = \ - { 'openid': - { 'SERVERS': - [dict(id='google', - name='Google', - openid_url='https://www.google.com/accounts/o8/id')]}} +SOCIALACCOUNT_PROVIDERS = { + 'openid': { + 'SERVERS': [], + }, + 'google': { + 'AUTH_PARAMS': { + 'access_type': 'online', + } + }, + 'facebook': { + 'METHOD': 'oauth2', + 'SCOPE': ['email', 'public_profile'], + }, +}