From 0d1cc1d79d667d81d8cb951e9d00762f6a65b7f6 Mon Sep 17 00:00:00 2001 From: Anand Swaminathan Date: Wed, 3 Mar 2021 15:44:45 -0800 Subject: [PATCH] Fixes for L5 Signed-off-by: Anand Swaminathan --- pkg/auth/auth_context.go | 2 +- pkg/auth/handlers.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/auth/auth_context.go b/pkg/auth/auth_context.go index b81124949..bed7ec070 100644 --- a/pkg/auth/auth_context.go +++ b/pkg/auth/auth_context.go @@ -196,7 +196,7 @@ func GetL5Oauth2Config(mainConfig *oauth2.Config) oauth2.Config { RedirectURL: "https://flyte-rs.av.lyft.net/callback", ClientID: mainConfig.ClientID, ClientSecret: mainConfig.ClientSecret, - Scopes: []string{OidcScope, OfflineAccessType, ProfileScope}, + Scopes: mainConfig.Scopes, Endpoint: oauth2.Endpoint{ AuthURL: mainConfig.Endpoint.AuthURL, TokenURL: mainConfig.Endpoint.TokenURL, diff --git a/pkg/auth/handlers.go b/pkg/auth/handlers.go index 0c92cd1d6..286bb4787 100644 --- a/pkg/auth/handlers.go +++ b/pkg/auth/handlers.go @@ -18,6 +18,7 @@ import ( "github.com/lyft/flytestdlib/contextutils" "github.com/lyft/flytestdlib/errors" "github.com/lyft/flytestdlib/logger" + "golang.org/x/oauth2" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/metadata"