diff --git a/app/server/server.py b/app/server/server.py index e7d24ee7..f88982e6 100644 --- a/app/server/server.py +++ b/app/server/server.py @@ -130,9 +130,12 @@ async def logout(request: Request): # Login route. You will be redirected to the google login page @handler.get("/login") async def login(request: Request): + # this is the route that will be called after the user logs in redirect_uri = request.url_for( - "auth" - ) # this is the route that will be called after the user logs in + "auth", + ) + if (request.url.__str__()).startswith("https"): + redirect_uri = redirect_uri.__str__().replace("http", "https") return await oauth.google.authorize_redirect(request, redirect_uri)