feat: experimental SSO support for Google, Microsoft, and OIDC

This commit is contained in:
Jun Siang Cheah committed 2024-05-26 11:26:15 +01:00
1 parent a842d8d62b
commit 0210a105bf
10 files changed
+351 -6

No files matched your search

+6 -1
View File
@@ -2,6 +2,7 @@
import { onMount, tick, setContext } from 'svelte';
import { config, user, theme, WEBUI_NAME, mobile } from '$lib/stores';
import { goto } from '$app/navigation';
import { page } from '$app/stores';
import { Toaster, toast } from 'svelte-sonner';
import { getBackendConfig } from '$lib/apis';
@@ -75,7 +76,11 @@
await goto('/auth');
}
} else {
await goto('/auth');
// Don't redirect if we're already on the auth page
// Needed because we pass in tokens from OAuth logins via URL fragments
if ($page.url.pathname !== '/auth') {
await goto('/auth');
}
}
}
} else {