File tree Expand file tree Collapse file tree 3 files changed +8
-1
lines changed
Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 1+ - Add ` refreshAccessToken() ` method to Figma provider ([ #258 ] ( https://github.com/pilcrowonpaper/arctic/pull/258 ) ).
Original file line number Diff line number Diff line change 11{
22 "name" : " arctic" ,
33 "type" : " module" ,
4- "version" : " 3.2.0 " ,
4+ "version" : " 3.2.1 " ,
55 "description" : " OAuth 2.0 clients for popular providers" ,
66 "main" : " dist/index.js" ,
77 "types" : " dist/index.d.ts" ,
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import type { OAuth2Tokens } from "../oauth2.js";
44
55const authorizationEndpoint = "https://www.figma.com/oauth" ;
66const tokenEndpoint = "https://www.figma.com/api/oauth/token" ;
7+ const refreshEndpoint = "https://api.figma.com/v1/oauth/refresh" ;
78
89export class Figma {
910 private client : OAuth2Client ;
@@ -21,4 +22,9 @@ export class Figma {
2122 const tokens = await this . client . validateAuthorizationCode ( tokenEndpoint , code , null ) ;
2223 return tokens ;
2324 }
25+
26+ public async refreshAccessToken ( refreshToken : string ) : Promise < OAuth2Tokens > {
27+ const tokens = await this . client . refreshAccessToken ( refreshEndpoint , refreshToken , [ ] ) ;
28+ return tokens ;
29+ }
2430}
You can’t perform that action at this time.
0 commit comments