From 0295bda0db7dcd26362eda645d25eb14249f9ae6 Mon Sep 17 00:00:00 2001 From: Oskar Zabik Date: Mon, 4 Nov 2024 16:32:34 +0000 Subject: [PATCH] fix: default to "files:read" scope for Figma provider --- internal/api/external_figma_test.go | 2 +- internal/api/provider/figma.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/api/external_figma_test.go b/internal/api/external_figma_test.go index ccd59b1ff..6e119b9ec 100644 --- a/internal/api/external_figma_test.go +++ b/internal/api/external_figma_test.go @@ -27,7 +27,7 @@ func (ts *ExternalTestSuite) TestSignupExternalFigma() { ts.Equal(ts.Config.External.Figma.RedirectURI, q.Get("redirect_uri")) ts.Equal(ts.Config.External.Figma.ClientID, []string{q.Get("client_id")}) ts.Equal("code", q.Get("response_type")) - ts.Equal("file_read", q.Get("scope")) + ts.Equal("files:read", q.Get("scope")) claims := ExternalProviderClaims{} p := jwt.NewParser(jwt.WithValidMethods([]string{jwt.SigningMethodHS256.Name})) diff --git a/internal/api/provider/figma.go b/internal/api/provider/figma.go index 2ebdd0131..46a3101c7 100644 --- a/internal/api/provider/figma.go +++ b/internal/api/provider/figma.go @@ -39,7 +39,7 @@ func NewFigmaProvider(ext conf.OAuthProviderConfiguration, scopes string) (OAuth // Figma only provides the "file_read" scope. oauthScopes := []string{ - "file_read", + "files:read", } if scopes != "" {