Skip to content

Commit

Permalink
Merge pull request #1 from supabase/master
Browse files Browse the repository at this point in the history
fix: default to files:read scope for Figma provider (supabase#1831)
  • Loading branch information
hbasria authored Nov 12, 2024
2 parents 3af0878 + 9ce2857 commit f8f16fb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion internal/api/external_figma_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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}))
Expand Down
3 changes: 1 addition & 2 deletions internal/api/provider/figma.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,8 @@ func NewFigmaProvider(ext conf.OAuthProviderConfiguration, scopes string) (OAuth
authHost := chooseHost(ext.URL, defaultFigmaAuthBase)
apiHost := chooseHost(ext.URL, defaultFigmaAPIBase)

// Figma only provides the "file_read" scope.
oauthScopes := []string{
"file_read",
"files:read",
}

if scopes != "" {
Expand Down

0 comments on commit f8f16fb

Please sign in to comment.