feat: only automatically redirect to provider if the url contains ?redirectToProvider=true and it's the only one
Resolves https://github.com/go-vikunja/frontend/issues/90
This commit is contained in:
parent
98b38af43c
commit
3891d5b876
@ -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)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user