diff --git a/app/auth_api/views.py b/app/auth_api/views.py index 91597d1..64fde90 100644 --- a/app/auth_api/views.py +++ b/app/auth_api/views.py @@ -1,6 +1,8 @@ from rest_framework.views import APIView from rest_framework import permissions +import os + from allauth.socialaccount.providers.google.views import GoogleOAuth2Adapter from allauth.socialaccount.providers.oauth2.client import OAuth2Client from dj_rest_auth.registration.views import SocialLoginView @@ -10,7 +12,7 @@ class GoogleLoginView(SocialLoginView): # Authorization Code grant adapter_class = GoogleOAuth2Adapter - callback_url = "http://localhost:3000/api/auth/callback/google" + callback_url = f"{os.environ.get("BASE_URL", 'http://localhost:3000')}/api/auth/callback/google" client_class = OAuth2Client