0
0
mirror of https://github.com/go-gitea/gitea.git synced 2025-07-21 18:54:39 +02:00

Remove generateScopes function and set Scopes to an empty array in OAuth authentication

This commit is contained in:
Tim Riedl 2025-04-21 05:25:32 +02:00
parent 6a27fbedda
commit 2de3030fb7
No known key found for this signature in database
GPG Key ID: 172D6410FC4F844E

View File

@ -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
}