From f967bcb2058b1af6dedb5f77ad84c1ad47a97e25 Mon Sep 17 00:00:00 2001 From: kolaente Date: Fri, 4 Nov 2022 13:08:12 +0100 Subject: [PATCH] fix(auth): always redirect to external openid provider if only one is enabled --- src/stores/auth.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stores/auth.ts b/src/stores/auth.ts index c5410f63f..17f8a1dd7 100644 --- a/src/stores/auth.ts +++ b/src/stores/auth.ts @@ -23,7 +23,7 @@ function redirectToProviderIfNothingElseIsEnabled() { auth.local.enabled === false && auth.openidConnect.enabled && auth.openidConnect.providers?.length === 1 && - window.location.pathname.startsWith('/login') // Kinda hacky, but prevents an endless loop. + (window.location.pathname.startsWith('/login') || window.location.pathname === '/') // Kinda hacky, but prevents an endless loop. ) { redirectToProvider(auth.openidConnect.providers[0], auth.openidConnect.redirectUrl) }