fix(auth): don't try to find openid provider when none are configured

Fixes a regression introduced in 748fa2b798

Related to https://github.com/go-vikunja/vikunja/issues/397
This commit is contained in:
kolaente 2025-01-24 19:16:02 +01:00
parent acf1ce862a
commit 66293795e7
No known key found for this signature in database
GPG Key ID: F40E70337AB24C9B
1 changed files with 1 additions and 1 deletions

View File

@ -426,7 +426,7 @@ export const useAuthStore = defineStore('auth', () => {
await checkAuth()
// if configured, redirect to OIDC Provider on logout
const fullProvider: IProvider = configStore.auth.openidConnect.providers.find((p: IProvider) => p.key === loggedInVia)
const fullProvider: IProvider = configStore.auth.openidConnect.providers?.find((p: IProvider) => p.key === loggedInVia)
if (fullProvider) {
redirectToProviderOnLogout(fullProvider)
}