diff --git a/config.yml.sample b/config.yml.sample index 5d782d60e..9820b3244 100644 --- a/config.yml.sample +++ b/config.yml.sample @@ -311,6 +311,9 @@ auth: - name: # The auth url to send users to if they want to authenticate using OpenID Connect. authurl: + # The oidc logouturl that users will be redirected to on logout + # leave empty or delete key, if you do not want to be redirected + logouturl: # The client ID used to authenticate Vikunja at the OpenID Connect provider. clientid: # The client secret used to authenticate Vikunja at the OpenID Connect provider. diff --git a/pkg/modules/auth/openid/providers.go b/pkg/modules/auth/openid/providers.go index 267e62b69..f3cfe8381 100644 --- a/pkg/modules/auth/openid/providers.go +++ b/pkg/modules/auth/openid/providers.go @@ -120,13 +120,18 @@ func getProviderFromMap(pi map[string]interface{}) (provider *Provider, err erro k := getKeyFromName(name) + logoutUrl, ok := pi["logout_url"].(string) + if !ok { + logoutUrl = "" + } + provider = &Provider{ Name: pi["name"].(string), Key: k, AuthURL: pi["authurl"].(string), OriginalAuthURL: pi["authurl"].(string), ClientSecret: pi["clientsecret"].(string), - LogoutURL: pi["logouturl"].(string), + LogoutURL: logoutUrl, } cl, is := pi["clientid"].(int)