make provider scopes more robust add default openid profile email

This commit is contained in:
viehlieb 2023-02-01 16:34:35 +01:00
parent 625d847e9f
commit c7bf4e8476
1 changed files with 5 additions and 1 deletions

View File

@ -125,6 +125,10 @@ func getProviderFromMap(pi map[string]interface{}) (provider *Provider, err erro
logoutURL = ""
}
scope, _ := pi["scope"].(string)
if scope == "" {
scope = "openid profile email"
}
provider = &Provider{
Name: pi["name"].(string),
Key: k,
@ -132,7 +136,7 @@ func getProviderFromMap(pi map[string]interface{}) (provider *Provider, err erro
OriginalAuthURL: pi["authurl"].(string),
ClientSecret: pi["clientsecret"].(string),
LogoutURL: logoutURL,
Scope: pi["scope"].(string),
Scope: scope,
}
cl, is := pi["clientid"].(int)