diff --git a/apps/account/serializers/web.py b/apps/account/serializers/web.py
index d325cea6..8d6fadf7 100644
--- a/apps/account/serializers/web.py
+++ b/apps/account/serializers/web.py
@@ -1,6 +1,5 @@
"""Serializers for account web"""
from django.contrib.auth import password_validation as password_validators
-from django.utils.translation import gettext_lazy as _
from rest_framework import serializers
from account import models
@@ -25,7 +24,7 @@ class PasswordResetSerializer(serializers.Serializer):
if not user.is_authenticated:
if not username_or_email:
- raise serializers.ValidationError(_('username or email not in request body.'))
+ raise utils_exceptions.UserNotFoundError()
filters = {}
if username_validator(username_or_email):
diff --git a/apps/authorization/views/common.py b/apps/authorization/views/common.py
index 98f79bd9..4231ed7a 100644
--- a/apps/authorization/views/common.py
+++ b/apps/authorization/views/common.py
@@ -116,7 +116,7 @@ class OAuth2SignUpView(OAuth2ViewMixin, JWTGenericViewMixin):
source = serializer.validated_data.get('source')
request_data.update({
'grant_type': settings.OAUTH2_SOCIAL_AUTH_GRANT_TYPE,
- 'backend': settings.OAUTH2_SOCIAL_AUTH_BACKEND_NAME
+ 'backend': settings.OAUTH2_SOCIAL_AUTH_BACKEND_NAME,
})
# Use the rest framework `.data` to fake the post body of the django request.
diff --git a/project/settings/base.py b/project/settings/base.py
index 71fbf147..1a54b1b7 100644
--- a/project/settings/base.py
+++ b/project/settings/base.py
@@ -256,6 +256,10 @@ OAUTH2_PROVIDER_APPLICATION_MODEL = 'authorization.Application'
# Facebook configuration
SOCIAL_AUTH_FACEBOOK_KEY = '386843648701452'
SOCIAL_AUTH_FACEBOOK_SECRET = 'a71cf0bf3980843a8f1ea74c6d805fd7'
+SOCIAL_AUTH_FACEBOOK_SCOPE = ['email', ]
+SOCIAL_AUTH_FACEBOOK_PROFILE_EXTRA_PARAMS = {
+ 'fields': 'id, name, email',
+}
# SMS Settings
SMS_EXPIRATION = 5
diff --git a/project/templates/account/change_email.html b/project/templates/account/change_email.html
index 40c1b227..0a257ed6 100644
--- a/project/templates/account/change_email.html
+++ b/project/templates/account/change_email.html
@@ -3,7 +3,7 @@
{% trans "Please go to the following page for confirmation new email address:" %}
-https://{{ country_code }}.{{ domain_uri }}/registered/{{ uidb64 }}/{{ token }}/
+https://{{ country_code }}.{{ domain_uri }}/registered/{{ uidb64 }}/{{ token }}/
{% trans "Thanks for using our site!" %}
diff --git a/project/templates/account/password_reset_email.html b/project/templates/account/password_reset_email.html
index ee84fd0b..9fb3fbf3 100644
--- a/project/templates/account/password_reset_email.html
+++ b/project/templates/account/password_reset_email.html
@@ -3,7 +3,7 @@
{% trans "Please go to the following page and choose a new password:" %}
-https://{{ country_code }}.{{ domain_uri }}/recovery/{{ uidb64 }}/{{ token }}/
+https://{{ country_code }}.{{ domain_uri }}/recovery/{{ uidb64 }}/{{ token }}/
{% trans "Thanks for using our site!" %}
diff --git a/project/templates/authorization/confirm_email.html b/project/templates/authorization/confirm_email.html
index f3bbd50e..3e51add7 100644
--- a/project/templates/authorization/confirm_email.html
+++ b/project/templates/authorization/confirm_email.html
@@ -2,8 +2,7 @@
{% blocktrans %}You're receiving this email because you trying to register new account at {{ site_name }}.{% endblocktrans %}
{% trans "Please confirm your email address to complete the registration:" %}
-
-https://{{ country_code }}.{{ domain_uri }}/registered/{{ uidb64 }}/{{ token }}/
+https://{{ country_code }}.{{ domain_uri }}/registered/{{ uidb64 }}/{{ token }}/
{% trans "Thanks for using our site!" %}