mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Auth: use the scope parameter instead of a hardcoded value in appendUniqueScope() (#84053)
use the scope parameter instead of a hardcoded value
This commit is contained in:
parent
b8d8662bd9
commit
beea7d1c2b
@ -197,7 +197,7 @@ func CreateOAuthInfoFromKeyValues(settingsKV map[string]any) (*social.OAuthInfo,
|
|||||||
}
|
}
|
||||||
|
|
||||||
func appendUniqueScope(config *oauth2.Config, scope string) {
|
func appendUniqueScope(config *oauth2.Config, scope string) {
|
||||||
if !slices.Contains(config.Scopes, social.OfflineAccessScope) {
|
if !slices.Contains(config.Scopes, scope) {
|
||||||
config.Scopes = append(config.Scopes, social.OfflineAccessScope)
|
config.Scopes = append(config.Scopes, scope)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user