Buckets:
| import { OAuth2Client } from "../client.js"; | |
| const authorizationEndpoint = "https://appcenter.intuit.com/connect/oauth2"; | |
| const tokenEndpoint = "https://oauth.platform.intuit.com/oauth2/v1/tokens/bearer"; | |
| const tokenRevocationEndpoint = "https://developer.API.intuit.com/v2/oauth2/tokens/revoke"; | |
| export class Intuit { | |
| client; | |
| constructor(clientId, clientSecret, redirectURI) { | |
| this.client = new OAuth2Client(clientId, clientSecret, redirectURI); | |
| } | |
| createAuthorizationURL(state, scopes) { | |
| const url = this.client.createAuthorizationURL(authorizationEndpoint, state, scopes); | |
| return url; | |
| } | |
| async validateAuthorizationCode(code) { | |
| const tokens = await this.client.validateAuthorizationCode(tokenEndpoint, code, null); | |
| return tokens; | |
| } | |
| async refreshAccessToken(refreshToken) { | |
| const tokens = await this.client.refreshAccessToken(tokenEndpoint, refreshToken, []); | |
| return tokens; | |
| } | |
| async revokeToken(token) { | |
| await this.client.revokeToken(tokenRevocationEndpoint, token); | |
| } | |
| } | |
Xet Storage Details
- Size:
- 1.08 kB
- Xet hash:
- 327a75126a2fe0505a88d2d9361fc2601f8d8c1cca68c2f5ac3d9628fe28ece2
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.