forked from phoenix/litellm-mirror
(fix) improve sso error msg
This commit is contained in:
parent
d858f4c027
commit
6cf4557a5a
1 changed files with 4 additions and 4 deletions
|
@ -2866,9 +2866,9 @@ async def google_login(request: Request):
|
||||||
GOOGLE_REDIRECT_URI = os.getenv("PROXY_BASE_URL")
|
GOOGLE_REDIRECT_URI = os.getenv("PROXY_BASE_URL")
|
||||||
if GOOGLE_REDIRECT_URI is None:
|
if GOOGLE_REDIRECT_URI is None:
|
||||||
raise ProxyException(
|
raise ProxyException(
|
||||||
message="GOOGLE_REDIRECT_URI not set. Set it in .env file",
|
message="PROXY_BASE_URL not set. Set it in .env file",
|
||||||
type="auth_error",
|
type="auth_error",
|
||||||
param="GOOGLE_REDIRECT_URI",
|
param="PROXY_BASE_URL",
|
||||||
code=status.HTTP_500_INTERNAL_SERVER_ERROR,
|
code=status.HTTP_500_INTERNAL_SERVER_ERROR,
|
||||||
)
|
)
|
||||||
if GOOGLE_REDIRECT_URI.endswith("/"):
|
if GOOGLE_REDIRECT_URI.endswith("/"):
|
||||||
|
@ -2896,9 +2896,9 @@ async def google_callback(code: str, request: Request):
|
||||||
GOOGLE_REDIRECT_URI = os.getenv("PROXY_BASE_URL")
|
GOOGLE_REDIRECT_URI = os.getenv("PROXY_BASE_URL")
|
||||||
if GOOGLE_REDIRECT_URI is None:
|
if GOOGLE_REDIRECT_URI is None:
|
||||||
raise ProxyException(
|
raise ProxyException(
|
||||||
message="GOOGLE_REDIRECT_URI not set. Set it in .env file",
|
message="PROXY_BASE_URL not set. Set it in .env file",
|
||||||
type="auth_error",
|
type="auth_error",
|
||||||
param="GOOGLE_REDIRECT_URI",
|
param="PROXY_BASE_URL",
|
||||||
code=status.HTTP_500_INTERNAL_SERVER_ERROR,
|
code=status.HTTP_500_INTERNAL_SERVER_ERROR,
|
||||||
)
|
)
|
||||||
# Add "/google-callback"" to your callback URL
|
# Add "/google-callback"" to your callback URL
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue