mirror of
https://github.com/portainer/portainer.git
synced 2025-07-25 08:19:40 +02:00
refactor(oauth): remove separation of strings
This commit is contained in:
parent
de5f6086d0
commit
193e7eb3f8
1 changed files with 2 additions and 2 deletions
|
@ -8,7 +8,6 @@ import (
|
|||
"mime"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"strings"
|
||||
|
||||
"github.com/portainer/portainer"
|
||||
"golang.org/x/oauth2"
|
||||
|
@ -110,6 +109,7 @@ func buildConfig(oauthSettings *portainer.OAuthSettings) *oauth2.Config {
|
|||
ClientSecret: oauthSettings.ClientSecret,
|
||||
Endpoint: endpoint,
|
||||
RedirectURL: oauthSettings.RedirectURI,
|
||||
Scopes: strings.Split(oauthSettings.Scopes, ","),
|
||||
// TODO figure out how to handle different providers, see https://github.com/golang/oauth2/issues/119
|
||||
Scopes: []string{oauthSettings.Scopes},
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue