Skip to content

Commit 18fbbb5

Browse files
authored
fix: update figma token endpoint (#1952)
## What kind of change does this PR introduce? * Migrate figma oauth to use endpoint as listed in https://www.figma.com/developers/api#oauth_migration_guide
1 parent 8a26f4b commit 18fbbb5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

internal/api/external_figma_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ func (ts *ExternalTestSuite) TestSignupExternalFigma() {
4343
func FigmaTestSignupSetup(ts *ExternalTestSuite, tokenCount *int, userCount *int, code string, email string) *httptest.Server {
4444
server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
4545
switch r.URL.Path {
46-
case "/api/oauth/token":
46+
case "/v1/oauth/token":
4747
*tokenCount++
4848
ts.Equal(code, r.FormValue("code"))
4949
ts.Equal("authorization_code", r.FormValue("grant_type"))

internal/api/provider/figma.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ func NewFigmaProvider(ext conf.OAuthProviderConfiguration, scopes string) (OAuth
5151
ClientSecret: ext.Secret,
5252
Endpoint: oauth2.Endpoint{
5353
AuthURL: authHost + "/oauth",
54-
TokenURL: authHost + "/api/oauth/token",
54+
TokenURL: apiHost + "/v1/oauth/token",
5555
},
5656
RedirectURL: ext.RedirectURI,
5757
Scopes: oauthScopes,

0 commit comments

Comments
 (0)