diff options
Diffstat (limited to 'blocks/authAPI/views.py')
-rw-r--r-- | blocks/authAPI/views.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/blocks/authAPI/views.py b/blocks/authAPI/views.py index e1cc173b..8afd799a 100644 --- a/blocks/authAPI/views.py +++ b/blocks/authAPI/views.py @@ -10,7 +10,6 @@ from django.http import HttpResponseNotFound from djoser import utils from djoser.serializers import TokenSerializer from authAPI.serializers import TokenCreateSerializer -from blocks.settings import DOMAIN Token = djoser_settings.TOKEN_MODEL @@ -26,8 +25,7 @@ def activate_user(request, uid, token): Link to this route is sent via email to user for verification """ - protocol = 'https://' if request.is_secure() else 'http://' - web_url = protocol + request.get_host() + '/api/auth/users/activation/' # URL comes from Djoser library + web_url = settings.POST_ACTIVATE_REDIRECT_URL + 'api/auth/users/activation/' # URL comes from Djoser library return render(request, 'activate_user.html', {'uid': uid, 'token': token, @@ -50,8 +48,7 @@ def get_social_user(email, request, callback, service): user.save() token, created = Token.objects.get_or_create(user=user) - protocol = 'https://' if request.is_secure() else 'http://' - web_url = protocol + DOMAIN + '/#/dashboard' + web_url = settings.POST_ACTIVATE_REDIRECT_URL + '#/dashboard' return render(request, callback, {'token': token, |