mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-09 03:18:44 +00:00
Gate legacy redirect on authLoading to ensure proxyBaseUrl is resolved
The redirect useEffect fires before getUiConfig() completes, so proxyBaseUrl is always "" on first render. Gate on !authLoading so the redirect only fires after config is fetched, matching the pattern used by the login redirect. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
e9e5ed989c
commit
2e70c23307
1 changed files with 2 additions and 2 deletions
|
|
@ -256,11 +256,11 @@ function CreateKeyPageContent() {
|
|||
// Redirect legacy query-param pages to their new path-based routes
|
||||
const isLegacyRedirect = page in LEGACY_REDIRECTS;
|
||||
useEffect(() => {
|
||||
if (isLegacyRedirect) {
|
||||
if (!authLoading && isLegacyRedirect) {
|
||||
const base = (proxyBaseUrl || "") + "/ui";
|
||||
router.replace(`${base}/${LEGACY_REDIRECTS[page]}`);
|
||||
}
|
||||
}, [isLegacyRedirect, page, router]);
|
||||
}, [authLoading, isLegacyRedirect, page, router]);
|
||||
|
||||
// Check for a stored return URL after successful authentication
|
||||
// This handles the case where user comes back from SSO and we need to redirect to the original URL
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue