diff --git a/routers/api/v1/admin/auth_oauth.go b/routers/api/v1/admin/auth_oauth.go index bd7bc0b4fc..924e2c723a 100644 --- a/routers/api/v1/admin/auth_oauth.go +++ b/routers/api/v1/admin/auth_oauth.go @@ -60,7 +60,7 @@ func CreateOauthAuth(ctx *context.APIContext) { OpenIDConnectAutoDiscoveryURL: form.ProviderAutoDiscoveryURL, CustomURLMapping: nil, IconURL: form.ProviderIconURL, - Scopes: generateScopes(), + Scopes: []string{}, RequiredClaimName: form.RequiredClaimName, RequiredClaimValue: form.RequiredClaimValue, SkipLocalTwoFA: form.SkipLocal2FA, @@ -146,7 +146,7 @@ func EditOauthAuth(ctx *context.APIContext) { OpenIDConnectAutoDiscoveryURL: form.ProviderAutoDiscoveryURL, CustomURLMapping: nil, IconURL: form.ProviderIconURL, - Scopes: generateScopes(), + Scopes: []string{}, RequiredClaimName: form.RequiredClaimName, RequiredClaimValue: form.RequiredClaimValue, SkipLocalTwoFA: form.SkipLocal2FA, @@ -267,17 +267,3 @@ func SearchOauthAuth(ctx *context.APIContext) { ctx.SetTotalCountHeader(maxResults) ctx.JSON(http.StatusOK, &results) } - -// ??? todo: what should I do here? -func generateScopes() []string { - var scopes []string - - // for _, s := range strings.Split(form.Oauth2Scopes, ",") { - // s = strings.TrimSpace(s) - // if s != "" { - // scopes = append(scopes, s) - // } - // } - - return scopes -}