For upgrades
[wolnelektury.git] / src / wolnelektury / settings / auth.py
1 # This file is part of Wolne Lektury, licensed under GNU Affero GPLv3 or later.
2 # Copyright © Fundacja Wolne Lektury. See NOTICE for more information.
3 #
4 AUTHENTICATION_BACKENDS = [
5     #'django.contrib.auth.backends.ModelBackend',
6     'allauth.account.auth_backends.AuthenticationBackend',
7 ]
8 ACCOUNT_EMAIL_CONFIRMATION_EXPIRE_DAYS = 2
9 ACCOUNT_AUTHENTICATION_METHOD = "username_email"
10 FEATURE_CONFIRM_USER = False
11
12 LOGIN_URL = '/uzytkownik/login/'
13
14 LOGIN_REDIRECT_URL = '/'
15
16 SOCIALACCOUNT_AUTO_SIGNUP = False
17 SOCIALACCOUNT_QUERY_EMAIL = True
18
19
20 SOCIALACCOUNT_PROVIDERS = {
21     'openid': {
22         'SERVERS': [],
23     },
24     'google': {
25         'AUTH_PARAMS': {
26             'access_type': 'online',
27         }
28     },
29     'facebook': {
30         'METHOD': 'oauth2',
31         'SCOPE': ['email', 'public_profile'],
32     },
33 }