From 193e7eb3f84ca62ebdeded3bbd29f5d52450c029 Mon Sep 17 00:00:00 2001 From: Chaim Lev Ari Date: Fri, 18 Jan 2019 11:53:44 +0200 Subject: [PATCH] refactor(oauth): remove separation of strings --- api/oauth/oauth.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/oauth/oauth.go b/api/oauth/oauth.go index 12d0d440c..3b3d210bc 100644 --- a/api/oauth/oauth.go +++ b/api/oauth/oauth.go @@ -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}, } }