From 86955647225ae87773144c683a188cdbed81f5d5 Mon Sep 17 00:00:00 2001 From: ishaan-jaff Date: Sat, 27 Jan 2024 18:28:10 -0800 Subject: [PATCH] (fix) redirect proxy users after they have been auth --- litellm/proxy/proxy_server.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/litellm/proxy/proxy_server.py b/litellm/proxy/proxy_server.py index fbb55b041c5..51ecfc9e6f0 100644 --- a/litellm/proxy/proxy_server.py +++ b/litellm/proxy/proxy_server.py @@ -2938,11 +2938,17 @@ async def google_callback(code: str, request: Request): key = response["token"] # type: ignore user_id = response["user_id"] # type: ignore - return RedirectResponse(url="chat.openai.com") - # return RedirectResponse(url=google_auth_url) - # return JSONResponse( - # content={"key": key, "user_id": user_id}, status_code=200 - # ) + litellm_dashboard_ui = "http://localhost:3000" + + litellm_dashboard_ui += ( + "?userID=" + + user_id + + "&accessToken=" + + key + + "&proxyBaseUrl=" + + GOOGLE_REDIRECT_URI + ) + return RedirectResponse(url=litellm_dashboard_ui) else: # Handle user info retrieval error