diff --git a/src/stores/auth.ts b/src/stores/auth.ts index 17f8a1dd7c..62ec7acf2a 100644 --- a/src/stores/auth.ts +++ b/src/stores/auth.ts @@ -23,7 +23,8 @@ function redirectToProviderIfNothingElseIsEnabled() { auth.local.enabled === false && auth.openidConnect.enabled && auth.openidConnect.providers?.length === 1 && - (window.location.pathname.startsWith('/login') || window.location.pathname === '/') // Kinda hacky, but prevents an endless loop. + (window.location.pathname.startsWith('/login') || window.location.pathname === '/') && // Kinda hacky, but prevents an endless loop. + window.location.search.includes('redirectToProvider=true') ) { redirectToProvider(auth.openidConnect.providers[0], auth.openidConnect.redirectUrl) }