Automatic OIDC redirect

This commit is contained in:
surfingbytes 2026-03-26 17:51:59 +00:00
parent 112e486314
commit 48058fd167
1 changed files with 9 additions and 0 deletions

View File

@ -180,6 +180,15 @@ onBeforeMount(() => {
// route before the submit() handler gets a chance to use it.
if (authenticated.value) {
router.push({name: 'home'})
return
}
// When local and LDAP auth are both off and there's exactly one OIDC provider,
// skip the login page and redirect straight to the provider.
if (!localAuthEnabled.value && !ldapAuthEnabled.value
&& hasOpenIdProviders.value
&& openidConnect.value.providers?.length === 1) {
redirectToProvider(openidConnect.value.providers[0])
}
})