Skip to content

Commit 9ce2857

Browse files
authored
fix: default to files:read scope for Figma provider (#1831)
Closes #1827 by defaulting to `files:read` oAuth scope for Figma as per the issue.
1 parent 7c3cf26 commit 9ce2857

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

internal/api/external_figma_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ func (ts *ExternalTestSuite) TestSignupExternalFigma() {
2727
ts.Equal(ts.Config.External.Figma.RedirectURI, q.Get("redirect_uri"))
2828
ts.Equal(ts.Config.External.Figma.ClientID, []string{q.Get("client_id")})
2929
ts.Equal("code", q.Get("response_type"))
30-
ts.Equal("file_read", q.Get("scope"))
30+
ts.Equal("files:read", q.Get("scope"))
3131

3232
claims := ExternalProviderClaims{}
3333
p := jwt.NewParser(jwt.WithValidMethods([]string{jwt.SigningMethodHS256.Name}))

internal/api/provider/figma.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,8 @@ func NewFigmaProvider(ext conf.OAuthProviderConfiguration, scopes string) (OAuth
3737
authHost := chooseHost(ext.URL, defaultFigmaAuthBase)
3838
apiHost := chooseHost(ext.URL, defaultFigmaAPIBase)
3939

40-
// Figma only provides the "file_read" scope.
4140
oauthScopes := []string{
42-
"file_read",
41+
"files:read",
4342
}
4443

4544
if scopes != "" {

0 commit comments

Comments
 (0)