3
0

Refactor OIDC provider scope string

This commit is contained in:
Vivek Patel
2022-02-02 19:14:04 +05:30
committed by Tomaž Jerman
parent 760aec1c18
commit 6777576948
+4 -2
View File
@@ -52,8 +52,10 @@ func SetupGothProviders(log *zap.Logger, redirectUrl string, ep ...settings.Prov
wellKnown := strings.TrimSuffix(pc.IssuerUrl, "/") + WellKnown
scope := strings.Split(pc.Scope, " ")
if len(scope) == 0 {
var scope []string
if len(pc.Scope) > 0 {
scope = strings.Split(pc.Scope, " ")
} else {
scope = append(scope, "email")
}