mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 10:44:24 +00:00
(fix) proxy use env as GOOGLE_REDIRECT_URI
This commit is contained in:
parent
3699df2b31
commit
9bd4fa40ff
1 changed files with 2 additions and 13 deletions
|
@ -2859,12 +2859,7 @@ async def user_auth(request: Request):
|
|||
|
||||
@app.get("/google-login", tags=["experimental"])
|
||||
async def google_login(request: Request):
|
||||
scheme = request.url.scheme or "https"
|
||||
host = request.url.hostname or "localhost"
|
||||
port = request.url.port or 4000
|
||||
if "localhost" not in host:
|
||||
scheme = "https"
|
||||
GOOGLE_REDIRECT_URI = f"{scheme}://{host}:{port}/google-callback"
|
||||
GOOGLE_REDIRECT_URI = os.getenv("GOOGLE_REDIRECT_URI")
|
||||
GOOGLE_CLIENT_ID = (
|
||||
"246483686424-clje5sggkjma26ilktj6qssakqhoon0m.apps.googleusercontent.com"
|
||||
)
|
||||
|
@ -2876,13 +2871,7 @@ async def google_login(request: Request):
|
|||
async def google_callback(code: str, request: Request):
|
||||
import httpx
|
||||
|
||||
scheme = request.url.scheme or "https"
|
||||
host = request.url.hostname or "localhost"
|
||||
port = request.url.port or 4000
|
||||
if "localhost" not in host:
|
||||
scheme = "https"
|
||||
|
||||
GOOGLE_REDIRECT_URI = f"{scheme}://{host}:{port}/google-callback"
|
||||
GOOGLE_REDIRECT_URI = os.getenv("GOOGLE_REDIRECT_URI")
|
||||
GOOGLE_CLIENT_ID = (
|
||||
"246483686424-clje5sggkjma26ilktj6qssakqhoon0m.apps.googleusercontent.com"
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue