diff --git a/.env.dist b/.env.dist index dd2d5cc..2736864 100644 --- a/.env.dist +++ b/.env.dist @@ -12,4 +12,5 @@ POSTGRES_SCHEMA= # Google GOOGLE_CLIENT_ID= -GOOGLE_CLIENT_SECRET= \ No newline at end of file +GOOGLE_CLIENT_SECRET= +GOOGLE_REDIRECT_URI= \ No newline at end of file diff --git a/app/service/Users.py b/app/service/Users.py index 5f78cc9..1d7b7cf 100644 --- a/app/service/Users.py +++ b/app/service/Users.py @@ -42,7 +42,7 @@ def _get_access_token(self, authorization_code): "client_secret": os.environ["GOOGLE_CLIENT_SECRET"], "code": authorization_code, "grant_type": "authorization_code", - "redirect_uri": "http://localhost:8000/auth/google/callback" + "redirect_uri": os.environ["GOOGLE_REDIRECT_URI"] } response = requests.post(token_url, data=payload) if response.status_code == 200: