@draftlab/auth 0.15.0 → 0.15.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/dist/adapters/node.d.mts +0 -1
  2. package/dist/client.d.mts +293 -287
  3. package/dist/client.mjs +1 -0
  4. package/dist/core.d.mts +22 -23
  5. package/dist/core.mjs +3 -3
  6. package/dist/error.d.mts +53 -53
  7. package/dist/keys.d.mts +0 -1
  8. package/dist/mutex.d.mts +14 -14
  9. package/dist/provider/apple.d.mts +34 -35
  10. package/dist/provider/code.d.mts +75 -85
  11. package/dist/provider/discord.d.mts +49 -50
  12. package/dist/provider/facebook.d.mts +49 -50
  13. package/dist/provider/github.d.mts +50 -51
  14. package/dist/provider/gitlab.d.mts +34 -35
  15. package/dist/provider/google.d.mts +49 -50
  16. package/dist/provider/linkedin.d.mts +47 -48
  17. package/dist/provider/magiclink.d.mts +28 -38
  18. package/dist/provider/microsoft.d.mts +67 -68
  19. package/dist/provider/oauth2.d.mts +75 -76
  20. package/dist/provider/passkey.d.mts +20 -21
  21. package/dist/provider/password.d.mts +174 -202
  22. package/dist/provider/provider.d.mts +105 -107
  23. package/dist/provider/reddit.d.mts +33 -34
  24. package/dist/provider/slack.d.mts +34 -35
  25. package/dist/provider/spotify.d.mts +34 -35
  26. package/dist/provider/totp.d.mts +43 -44
  27. package/dist/provider/twitch.d.mts +33 -34
  28. package/dist/provider/vercel.d.mts +65 -66
  29. package/dist/revocation.d.mts +29 -30
  30. package/dist/storage/memory.d.mts +11 -12
  31. package/dist/storage/storage.d.mts +110 -110
  32. package/dist/storage/turso.d.mts +0 -1
  33. package/dist/storage/unstorage.d.mts +0 -1
  34. package/dist/subject.d.mts +0 -1
  35. package/dist/themes/theme.d.mts +101 -101
  36. package/dist/toolkit/client.d.mts +56 -57
  37. package/dist/toolkit/providers/facebook.d.mts +0 -1
  38. package/dist/toolkit/providers/github.d.mts +0 -1
  39. package/dist/toolkit/providers/google.d.mts +0 -1
  40. package/dist/toolkit/storage.d.mts +8 -8
  41. package/dist/ui/base.d.mts +0 -1
  42. package/dist/ui/code.d.mts +5 -6
  43. package/dist/ui/form.d.mts +6 -7
  44. package/dist/ui/icon.d.mts +0 -1
  45. package/dist/ui/magiclink.d.mts +5 -6
  46. package/dist/ui/passkey.d.mts +0 -1
  47. package/dist/ui/password.d.mts +2 -3
  48. package/dist/ui/select.d.mts +0 -1
  49. package/dist/ui/totp.d.mts +0 -1
  50. package/dist/util.d.mts +0 -1
  51. package/package.json +3 -3
package/dist/client.d.mts CHANGED
@@ -3,7 +3,6 @@ import { SubjectSchema } from "./subject.mjs";
3
3
  import { StandardSchemaV1 } from "@standard-schema/spec";
4
4
 
5
5
  //#region src/client.d.ts
6
-
7
6
  /**
8
7
  * Result type for operations that can succeed or fail.
9
8
  *
@@ -38,16 +37,16 @@ type FetchLike = (url: string, init?: RequestInit) => Promise<FetchResponse>;
38
37
  */
39
38
  interface WellKnown {
40
39
  /**
41
- * URI to the JWKS endpoint for token verification.
42
- */
40
+ * URI to the JWKS endpoint for token verification.
41
+ */
43
42
  jwks_uri: string;
44
43
  /**
45
- * URI to the token endpoint for authorization code exchange.
46
- */
44
+ * URI to the token endpoint for authorization code exchange.
45
+ */
47
46
  token_endpoint: string;
48
47
  /**
49
- * URI to the authorization endpoint for starting flows.
50
- */
48
+ * URI to the authorization endpoint for starting flows.
49
+ */
51
50
  authorization_endpoint: string;
52
51
  }
53
52
  /**
@@ -55,16 +54,16 @@ interface WellKnown {
55
54
  */
56
55
  interface Tokens {
57
56
  /**
58
- * Access token for making authenticated API requests.
59
- */
57
+ * Access token for making authenticated API requests.
58
+ */
60
59
  access: string;
61
60
  /**
62
- * Refresh token for obtaining new access tokens.
63
- */
61
+ * Refresh token for obtaining new access tokens.
62
+ */
64
63
  refresh: string;
65
64
  /**
66
- * Number of seconds until the access token expires.
67
- */
65
+ * Number of seconds until the access token expires.
66
+ */
68
67
  expiresIn: number;
69
68
  }
70
69
  /**
@@ -72,12 +71,12 @@ interface Tokens {
72
71
  */
73
72
  type Challenge = {
74
73
  /**
75
- * State parameter for CSRF protection.
76
- */
74
+ * State parameter for CSRF protection.
75
+ */
77
76
  state: string;
78
77
  /**
79
- * PKCE code verifier for token exchange.
80
- */
78
+ * PKCE code verifier for token exchange.
79
+ */
81
80
  verifier?: string;
82
81
  };
83
82
  /**
@@ -85,37 +84,37 @@ type Challenge = {
85
84
  */
86
85
  interface ClientInput {
87
86
  /**
88
- * Client ID that identifies your application.
89
- *
90
- * @example
91
- * ```ts
92
- * {
93
- * clientID: "my-web-app"
94
- * }
95
- * ```
96
- */
87
+ * Client ID that identifies your application.
88
+ *
89
+ * @example
90
+ * ```ts
91
+ * {
92
+ * clientID: "my-web-app"
93
+ * }
94
+ * ```
95
+ */
97
96
  clientID: string;
98
97
  /**
99
- * Base URL of your Draft Auth server.
100
- *
101
- * @example
102
- * ```ts
103
- * {
104
- * issuer: "https://auth.myserver.com"
105
- * }
106
- * ```
107
- */
98
+ * Base URL of your Draft Auth server.
99
+ *
100
+ * @example
101
+ * ```ts
102
+ * {
103
+ * issuer: "https://auth.myserver.com"
104
+ * }
105
+ * ```
106
+ */
108
107
  issuer: string;
109
108
  /**
110
- * Optionally, override the internally used fetch function.
111
- *
112
- * @example
113
- * ```ts
114
- * {
115
- * fetch: customFetch
116
- * }
117
- * ```
118
- */
109
+ * Optionally, override the internally used fetch function.
110
+ *
111
+ * @example
112
+ * ```ts
113
+ * {
114
+ * fetch: customFetch
115
+ * }
116
+ * ```
117
+ */
119
118
  fetch?: FetchLike;
120
119
  }
121
120
  /**
@@ -123,32 +122,32 @@ interface ClientInput {
123
122
  */
124
123
  interface AuthorizeOptions {
125
124
  /**
126
- * Enable PKCE flow for enhanced security.
127
- *
128
- * Recommended for single-page applications and mobile apps.
129
- *
130
- * @default false
131
- * @example
132
- * ```ts
133
- * {
134
- * pkce: true
135
- * }
136
- * ```
137
- */
125
+ * Enable PKCE flow for enhanced security.
126
+ *
127
+ * Recommended for single-page applications and mobile apps.
128
+ *
129
+ * @default false
130
+ * @example
131
+ * ```ts
132
+ * {
133
+ * pkce: true
134
+ * }
135
+ * ```
136
+ */
138
137
  pkce?: boolean;
139
138
  /**
140
- * Specific authentication provider to use.
141
- *
142
- * If not specified, users see a provider selection screen
143
- * or are redirected to the single configured provider.
144
- *
145
- * @example
146
- * ```ts
147
- * {
148
- * provider: "google"
149
- * }
150
- * ```
151
- */
139
+ * Specific authentication provider to use.
140
+ *
141
+ * If not specified, users see a provider selection screen
142
+ * or are redirected to the single configured provider.
143
+ *
144
+ * @example
145
+ * ```ts
146
+ * {
147
+ * provider: "google"
148
+ * }
149
+ * ```
150
+ */
152
151
  provider?: string;
153
152
  }
154
153
  /**
@@ -156,24 +155,24 @@ interface AuthorizeOptions {
156
155
  */
157
156
  interface AuthorizeResult {
158
157
  /**
159
- * Challenge data needed for PKCE flows.
160
- *
161
- * Store this securely and use when exchanging the code.
162
- *
163
- * @example
164
- * ```ts
165
- * sessionStorage.setItem("challenge", JSON.stringify(challenge))
166
- * ```
167
- */
158
+ * Challenge data needed for PKCE flows.
159
+ *
160
+ * Store this securely and use when exchanging the code.
161
+ *
162
+ * @example
163
+ * ```ts
164
+ * sessionStorage.setItem("challenge", JSON.stringify(challenge))
165
+ * ```
166
+ */
168
167
  challenge: Challenge;
169
168
  /**
170
- * Authorization URL to redirect the user to.
171
- *
172
- * @example
173
- * ```ts
174
- * window.location.href = url
175
- * ```
176
- */
169
+ * Authorization URL to redirect the user to.
170
+ *
171
+ * @example
172
+ * ```ts
173
+ * window.location.href = url
174
+ * ```
175
+ */
177
176
  url: string;
178
177
  }
179
178
  /**
@@ -181,17 +180,17 @@ interface AuthorizeResult {
181
180
  */
182
181
  interface RefreshOptions {
183
182
  /**
184
- * Current access token to check before refreshing.
185
- *
186
- * Helps avoid unnecessary refresh requests.
187
- *
188
- * @example
189
- * ```ts
190
- * {
191
- * access: currentAccessToken
192
- * }
193
- * ```
194
- */
183
+ * Current access token to check before refreshing.
184
+ *
185
+ * Helps avoid unnecessary refresh requests.
186
+ *
187
+ * @example
188
+ * ```ts
189
+ * {
190
+ * access: currentAccessToken
191
+ * }
192
+ * ```
193
+ */
195
194
  access?: string;
196
195
  }
197
196
  /**
@@ -199,34 +198,34 @@ interface RefreshOptions {
199
198
  */
200
199
  interface VerifyOptions {
201
200
  /**
202
- * Refresh token for automatic refresh if access token is expired.
203
- *
204
- * If passed in, this will automatically refresh the access token if it has expired.
205
- *
206
- * @example
207
- * ```ts
208
- * {
209
- * refresh: refreshToken
210
- * }
211
- * ```
212
- */
201
+ * Refresh token for automatic refresh if access token is expired.
202
+ *
203
+ * If passed in, this will automatically refresh the access token if it has expired.
204
+ *
205
+ * @example
206
+ * ```ts
207
+ * {
208
+ * refresh: refreshToken
209
+ * }
210
+ * ```
211
+ */
213
212
  refresh?: string;
214
213
  /**
215
- * Expected issuer for validation.
216
- * @internal
217
- */
214
+ * Expected issuer for validation.
215
+ * @internal
216
+ */
218
217
  issuer?: string;
219
218
  /**
220
- * Expected audience for validation.
221
- * Defaults to clientID for security. Override only if you know what you're doing.
222
- * @internal
223
- */
219
+ * Expected audience for validation.
220
+ * Defaults to clientID for security. Override only if you know what you're doing.
221
+ * @internal
222
+ */
224
223
  audience?: string;
225
224
  /**
226
- * Custom fetch for HTTP requests.
227
- *
228
- * Optionally, override the internally used fetch function.
229
- */
225
+ * Custom fetch for HTTP requests.
226
+ *
227
+ * Optionally, override the internally used fetch function.
228
+ */
230
229
  fetch?: FetchLike;
231
230
  }
232
231
  /**
@@ -234,19 +233,26 @@ interface VerifyOptions {
234
233
  */
235
234
  interface VerifyResult<T extends SubjectSchema> {
236
235
  /**
237
- * New tokens if access token was refreshed during verification.
238
- */
236
+ * New tokens if access token was refreshed during verification.
237
+ */
239
238
  tokens?: Tokens;
240
239
  /**
241
- * Audience (client ID) the token was issued for.
242
- * @internal
243
- */
240
+ * Audience (client ID) the token was issued for.
241
+ * @internal
242
+ */
244
243
  aud: string;
245
244
  /**
246
- * Decoded subject information from the access token.
247
- *
248
- * Contains user data that was encoded when the token was issued.
249
- */
245
+ * Unique subject identifier.
246
+ *
247
+ * This is a stable, consistent identifier derived from the subject type and properties.
248
+ * Format: `{type}:{hash}` (e.g., `user:30e16a2659c8bbb2`)
249
+ */
250
+ sub: string;
251
+ /**
252
+ * Decoded subject information from the access token.
253
+ *
254
+ * Contains user data that was encoded when the token was issued.
255
+ */
250
256
  subject: { [K in keyof T]: {
251
257
  type: K;
252
258
  properties: StandardSchemaV1.InferOutput<T[K]>;
@@ -257,18 +263,18 @@ interface VerifyResult<T extends SubjectSchema> {
257
263
  */
258
264
  interface RevokeOptions {
259
265
  /**
260
- * Optional hint about the token type.
261
- * Can be "access_token" or "refresh_token".
262
- *
263
- * Helps the server optimize token lookup.
264
- *
265
- * @example
266
- * ```ts
267
- * {
268
- * tokenTypeHint: "refresh_token"
269
- * }
270
- * ```
271
- */
266
+ * Optional hint about the token type.
267
+ * Can be "access_token" or "refresh_token".
268
+ *
269
+ * Helps the server optimize token lookup.
270
+ *
271
+ * @example
272
+ * ```ts
273
+ * {
274
+ * tokenTypeHint: "refresh_token"
275
+ * }
276
+ * ```
277
+ */
272
278
  tokenTypeHint?: "access_token" | "refresh_token";
273
279
  }
274
280
  /**
@@ -276,165 +282,165 @@ interface RevokeOptions {
276
282
  */
277
283
  interface Client {
278
284
  /**
279
- * Start an OAuth authorization flow.
280
- *
281
- * @param redirectURI - Where users will be sent after authorization
282
- * @param response - Response type ("code" or "token")
283
- * @param opts - Additional authorization options
284
- * @returns Authorization URL and challenge data
285
- *
286
- * @example Basic flow
287
- * ```ts
288
- * const result = await client.authorize(
289
- * "https://myapp.com/callback",
290
- * "code"
291
- * )
292
- * if (result.success) {
293
- * window.location.href = result.data.url
294
- * }
295
- * ```
296
- *
297
- * @example PKCE flow
298
- * ```ts
299
- * const result = await client.authorize(
300
- * "https://spa.example.com/callback",
301
- * "code",
302
- * { pkce: true, scopes: ["read", "write"] }
303
- * )
304
- * if (result.success) {
305
- * sessionStorage.setItem("challenge", JSON.stringify(result.data.challenge))
306
- * window.location.href = result.data.url
307
- * }
308
- * ```
309
- */
285
+ * Start an OAuth authorization flow.
286
+ *
287
+ * @param redirectURI - Where users will be sent after authorization
288
+ * @param response - Response type ("code" or "token")
289
+ * @param opts - Additional authorization options
290
+ * @returns Authorization URL and challenge data
291
+ *
292
+ * @example Basic flow
293
+ * ```ts
294
+ * const result = await client.authorize(
295
+ * "https://myapp.com/callback",
296
+ * "code"
297
+ * )
298
+ * if (result.success) {
299
+ * window.location.href = result.data.url
300
+ * }
301
+ * ```
302
+ *
303
+ * @example PKCE flow
304
+ * ```ts
305
+ * const result = await client.authorize(
306
+ * "https://spa.example.com/callback",
307
+ * "code",
308
+ * { pkce: true, scopes: ["read", "write"] }
309
+ * )
310
+ * if (result.success) {
311
+ * sessionStorage.setItem("challenge", JSON.stringify(result.data.challenge))
312
+ * window.location.href = result.data.url
313
+ * }
314
+ * ```
315
+ */
310
316
  authorize(redirectURI: string, response: "code" | "token", opts?: AuthorizeOptions): Promise<Result<AuthorizeResult>>;
311
317
  /**
312
- * Exchange authorization code for tokens.
313
- *
314
- * @param code - Authorization code from the callback
315
- * @param redirectURI - Same redirect URI used in authorization
316
- * @param verifier - PKCE code verifier (required for PKCE flows)
317
- * @returns Access tokens and metadata
318
- *
319
- * @example Basic exchange
320
- * ```ts
321
- * const urlParams = new URLSearchParams(window.location.search)
322
- * const code = urlParams.get('code')
323
- *
324
- * if (code) {
325
- * const result = await client.exchange(code, "https://myapp.com/callback")
326
- * if (result.success) {
327
- * const { access, refresh } = result.data
328
- * // Store tokens securely
329
- * }
330
- * }
331
- * ```
332
- *
333
- * @example PKCE exchange
334
- * ```ts
335
- * const challenge = JSON.parse(sessionStorage.getItem("challenge") || "{}")
336
- * const code = new URLSearchParams(window.location.search).get('code')
337
- *
338
- * if (code && challenge.verifier) {
339
- * const result = await client.exchange(
340
- * code,
341
- * "https://spa.example.com/callback",
342
- * challenge.verifier
343
- * )
344
- * if (result.success) {
345
- * sessionStorage.removeItem("challenge")
346
- * // Handle tokens
347
- * }
348
- * }
349
- * ```
350
- */
318
+ * Exchange authorization code for tokens.
319
+ *
320
+ * @param code - Authorization code from the callback
321
+ * @param redirectURI - Same redirect URI used in authorization
322
+ * @param verifier - PKCE code verifier (required for PKCE flows)
323
+ * @returns Access tokens and metadata
324
+ *
325
+ * @example Basic exchange
326
+ * ```ts
327
+ * const urlParams = new URLSearchParams(window.location.search)
328
+ * const code = urlParams.get('code')
329
+ *
330
+ * if (code) {
331
+ * const result = await client.exchange(code, "https://myapp.com/callback")
332
+ * if (result.success) {
333
+ * const { access, refresh } = result.data
334
+ * // Store tokens securely
335
+ * }
336
+ * }
337
+ * ```
338
+ *
339
+ * @example PKCE exchange
340
+ * ```ts
341
+ * const challenge = JSON.parse(sessionStorage.getItem("challenge") || "{}")
342
+ * const code = new URLSearchParams(window.location.search).get('code')
343
+ *
344
+ * if (code && challenge.verifier) {
345
+ * const result = await client.exchange(
346
+ * code,
347
+ * "https://spa.example.com/callback",
348
+ * challenge.verifier
349
+ * )
350
+ * if (result.success) {
351
+ * sessionStorage.removeItem("challenge")
352
+ * // Handle tokens
353
+ * }
354
+ * }
355
+ * ```
356
+ */
351
357
  exchange(code: string, redirectURI: string, verifier?: string): Promise<Result<Tokens, InvalidAuthorizationCodeError>>;
352
358
  /**
353
- * Refresh an access token using a refresh token.
354
- *
355
- * @param refresh - Refresh token to use
356
- * @param opts - Additional refresh options
357
- * @returns New tokens if refresh was needed
358
- *
359
- * @example Basic refresh
360
- * ```ts
361
- * const result = await client.refresh(storedRefreshToken)
362
- *
363
- * if (result.success && result.data.tokens) {
364
- * const { access, refresh: newRefresh } = result.data.tokens
365
- * updateStoredTokens(access, newRefresh)
366
- * } else if (result.success) {
367
- * // Token still valid
368
- * } else {
369
- * redirectToLogin()
370
- * }
371
- * ```
372
- */
359
+ * Refresh an access token using a refresh token.
360
+ *
361
+ * @param refresh - Refresh token to use
362
+ * @param opts - Additional refresh options
363
+ * @returns New tokens if refresh was needed
364
+ *
365
+ * @example Basic refresh
366
+ * ```ts
367
+ * const result = await client.refresh(storedRefreshToken)
368
+ *
369
+ * if (result.success && result.data.tokens) {
370
+ * const { access, refresh: newRefresh } = result.data.tokens
371
+ * updateStoredTokens(access, newRefresh)
372
+ * } else if (result.success) {
373
+ * // Token still valid
374
+ * } else {
375
+ * redirectToLogin()
376
+ * }
377
+ * ```
378
+ */
373
379
  refresh(refresh: string, opts?: RefreshOptions): Promise<Result<{
374
380
  tokens?: Tokens;
375
381
  }, InvalidRefreshTokenError | InvalidAccessTokenError>>;
376
382
  /**
377
- * Verify and decode an access token.
378
- *
379
- * @param subjects - Subject schema used when creating the issuer
380
- * @param token - Access token to verify
381
- * @param options - Additional verification options
382
- * @returns Decoded token data and user information
383
- *
384
- * @example Basic verification
385
- * ```ts
386
- * const result = await client.verify(subjects, accessToken)
387
- *
388
- * if (result.success) {
389
- * const { subject, scopes } = result.data
390
- * // Access user ID: subject.properties.userID
391
- * // Access scopes: scopes?.join(', ')
392
- * }
393
- * ```
394
- *
395
- * @example With automatic refresh
396
- * ```ts
397
- * const result = await client.verify(subjects, accessToken, {
398
- * refresh: refreshToken
399
- * })
400
- *
401
- * if (result.success) {
402
- * if (result.data.tokens) {
403
- * // Tokens were refreshed
404
- * updateStoredTokens(result.data.tokens.access, result.data.tokens.refresh)
405
- * }
406
- * // Use verified subject data
407
- * const user = result.data.subject.properties
408
- * }
409
- * ```
410
- */
383
+ * Verify and decode an access token.
384
+ *
385
+ * @param subjects - Subject schema used when creating the issuer
386
+ * @param token - Access token to verify
387
+ * @param options - Additional verification options
388
+ * @returns Decoded token data and user information
389
+ *
390
+ * @example Basic verification
391
+ * ```ts
392
+ * const result = await client.verify(subjects, accessToken)
393
+ *
394
+ * if (result.success) {
395
+ * const { subject, scopes } = result.data
396
+ * // Access user ID: subject.properties.userID
397
+ * // Access scopes: scopes?.join(', ')
398
+ * }
399
+ * ```
400
+ *
401
+ * @example With automatic refresh
402
+ * ```ts
403
+ * const result = await client.verify(subjects, accessToken, {
404
+ * refresh: refreshToken
405
+ * })
406
+ *
407
+ * if (result.success) {
408
+ * if (result.data.tokens) {
409
+ * // Tokens were refreshed
410
+ * updateStoredTokens(result.data.tokens.access, result.data.tokens.refresh)
411
+ * }
412
+ * // Use verified subject data
413
+ * const user = result.data.subject.properties
414
+ * }
415
+ * ```
416
+ */
411
417
  verify<T extends SubjectSchema>(subjects: T, token: string, options?: VerifyOptions): Promise<Result<VerifyResult<T>, InvalidRefreshTokenError | InvalidAccessTokenError | InvalidSubjectError>>;
412
418
  /**
413
- * Revoke a token (access or refresh token).
414
- *
415
- * Once revoked, the token cannot be used to access resources or refresh.
416
- * Useful for implementing logout functionality.
417
- *
418
- * @param token - The token to revoke
419
- * @param opts - Additional revocation options
420
- * @returns Empty result on success
421
- *
422
- * @example Logout with refresh token revocation
423
- * ```ts
424
- * const result = await client.revoke(refreshToken, {
425
- * tokenTypeHint: "refresh_token"
426
- * })
427
- *
428
- * if (result.success) {
429
- * // Token revoked successfully, user is logged out
430
- * clearStoredTokens()
431
- * redirectToHome()
432
- * } else {
433
- * // Revocation failed, but still clear tokens on client
434
- * clearStoredTokens()
435
- * }
436
- * ```
437
- */
419
+ * Revoke a token (access or refresh token).
420
+ *
421
+ * Once revoked, the token cannot be used to access resources or refresh.
422
+ * Useful for implementing logout functionality.
423
+ *
424
+ * @param token - The token to revoke
425
+ * @param opts - Additional revocation options
426
+ * @returns Empty result on success
427
+ *
428
+ * @example Logout with refresh token revocation
429
+ * ```ts
430
+ * const result = await client.revoke(refreshToken, {
431
+ * tokenTypeHint: "refresh_token"
432
+ * })
433
+ *
434
+ * if (result.success) {
435
+ * // Token revoked successfully, user is logged out
436
+ * clearStoredTokens()
437
+ * redirectToHome()
438
+ * } else {
439
+ * // Revocation failed, but still clear tokens on client
440
+ * clearStoredTokens()
441
+ * }
442
+ * ```
443
+ */
438
444
  revoke(token: string, opts?: RevokeOptions): Promise<Result<void>>;
439
445
  }
440
446
  /**