mirror of
https://github.com/grafana/grafana.git
synced 2024-11-25 18:30:41 -06:00
Auth: ignore non-OAuth2 providers when creating social connectors (#86989)
ignore non-oauth2 providers when creating social connectors
This commit is contained in:
parent
e6f51536bf
commit
45effc48d9
@ -8,6 +8,7 @@ import (
|
||||
"net"
|
||||
"net/http"
|
||||
"os"
|
||||
"slices"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
@ -58,6 +59,11 @@ func ProvideService(cfg *setting.Cfg,
|
||||
}
|
||||
|
||||
for _, ssoSetting := range allSettings {
|
||||
// ignore non-oauth2 providers
|
||||
if !slices.Contains(ssosettings.AllOAuthProviders, ssoSetting.Provider) {
|
||||
continue
|
||||
}
|
||||
|
||||
info, err := connectors.CreateOAuthInfoFromKeyValues(ssoSetting.Settings)
|
||||
if err != nil {
|
||||
ss.log.Error("Failed to create OAuthInfo for provider", "error", err, "provider", ssoSetting.Provider)
|
||||
|
Loading…
Reference in New Issue
Block a user