fix(auth): always redirect to external openid provider if only one is enabled
This commit is contained in:
parent
e49f960aea
commit
f967bcb205
@ -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)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user