forked from phoenix/litellm-mirror
(fix) auth google
This commit is contained in:
parent
020b1ec756
commit
dc78d16d05
1 changed files with 3 additions and 1 deletions
|
@ -2875,8 +2875,10 @@ async def google_callback(code: str, request: Request):
|
||||||
import httpx
|
import httpx
|
||||||
|
|
||||||
scheme = request.url.scheme
|
scheme = request.url.scheme
|
||||||
host = request.url.hostname
|
host = request.url.hostname or "localhost"
|
||||||
port = request.url.port or 4000
|
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 = f"{scheme}://{host}:{port}/google-callback"
|
||||||
GOOGLE_CLIENT_ID = (
|
GOOGLE_CLIENT_ID = (
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue