forked from phoenix/litellm-mirror
(fix) redirect proxy users after they have been auth
This commit is contained in:
parent
92aafa1560
commit
8695564722
1 changed files with 11 additions and 5 deletions
|
@ -2938,11 +2938,17 @@ async def google_callback(code: str, request: Request):
|
||||||
|
|
||||||
key = response["token"] # type: ignore
|
key = response["token"] # type: ignore
|
||||||
user_id = response["user_id"] # type: ignore
|
user_id = response["user_id"] # type: ignore
|
||||||
return RedirectResponse(url="chat.openai.com")
|
litellm_dashboard_ui = "http://localhost:3000"
|
||||||
# return RedirectResponse(url=google_auth_url)
|
|
||||||
# return JSONResponse(
|
litellm_dashboard_ui += (
|
||||||
# content={"key": key, "user_id": user_id}, status_code=200
|
"?userID="
|
||||||
# )
|
+ user_id
|
||||||
|
+ "&accessToken="
|
||||||
|
+ key
|
||||||
|
+ "&proxyBaseUrl="
|
||||||
|
+ GOOGLE_REDIRECT_URI
|
||||||
|
)
|
||||||
|
return RedirectResponse(url=litellm_dashboard_ui)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
# Handle user info retrieval error
|
# Handle user info retrieval error
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue