fix empty/missing logouturl leads to error, add description to config.yml.sample
This commit is contained in:
parent
6e36288ba7
commit
49f02dee87
|
@ -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.
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue