Skip to content

Commit

Permalink
Fix views google auth
Browse files Browse the repository at this point in the history
  • Loading branch information
matiasvallejosdev committed Jan 30, 2024
1 parent 3c14e43 commit ca9b5f1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/auth_api/views.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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


Expand Down

0 comments on commit ca9b5f1

Please sign in to comment.