@glideidentity/glide-be-node-magical-auth 3.0.0 → 3.2.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.
- package/LICENSE +190 -23
- package/README.md +245 -1
- package/dist/index.cjs +1007 -23
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +237 -12
- package/dist/index.d.ts +237 -12
- package/dist/index.js +996 -21
- package/dist/index.js.map +1 -1
- package/dist/{types-DgXuYYzq.d.cts → types-t9HAB-7Q.d.cts} +570 -179
- package/dist/{types-DgXuYYzq.d.ts → types-t9HAB-7Q.d.ts} +570 -179
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +1 -1
- package/dist/types.d.ts +1 -1
- package/package.json +4 -2
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
|
-
import { A as AuthenticationStrategy,
|
|
2
|
-
export { B as BadRequestError,
|
|
1
|
+
import { A as AuthenticationStrategy, S as PLMN, j as ClientInfo, X as PhoneNumberDetails, a as BiometricVerification, N as MagicalAuthConfig, a0 as PrepareRequest, a2 as PrepareResult, Z as PrepareMultipleRequest, _ as PrepareMultipleResult, av as VerifyPhoneNumberRequest, aw as VerifyPhoneNumberResponse, G as GetPhoneNumberRequest, w as GetPhoneNumberResponse, a6 as ReportInvocationResponse, ah as StatusResponse, H as HttpClient, K as Logger } from './types-t9HAB-7Q.cjs';
|
|
2
|
+
export { B as BadRequestError, b as BrowserMismatchError, C as CallOptions, c as CallStage, d as CallStrategyData, e as CarrierAppUnavailableError, f as CarrierNotEligibleError, g as CarrierRejectedError, h as CarrierTemporarilyUnavailableError, i as Challenge, k as ConsentData, D as DCQLCredential, l as DCQLCredentialMeta, m as DCQLQuery, n as DEFAULT_BASE_URL, o as DEFAULT_TIMEOUT, p as DesktopQRData, q as DesktopStrategyData, r as DesktopWaitError, s as DeviceBindingError, t as DeviceInfo, u as DeviceSwapInfo, E as ErrorCode, v as ErrorResponse, F as ForbiddenError, x as HttpRequestOptions, y as HttpResponse, I as InternalServerError, z as InvalidCredentialError, L as LinkStrategyData, J as LiveCallInfo, M as LoggerConfig, O as MagicalAuthError, P as MissingBindingCookieError, Q as NetworkCheck, R as NetworkOrigin, T as PREPARE_MULTIPLE_MAX, U as PasskeyChallenge, V as PasskeyOption, W as PasskeyStrategyData, Y as PhoneNumberMismatchError, $ as PrepareOptions, a1 as PrepareResponse, a3 as ProtocolType, a4 as RateLimitError, a5 as ReportInvocationRequest, a7 as ResolvedConfig, a8 as RiskLevel, a9 as ServiceUnavailableError, aa as SessionInfo, ab as SessionMetadataParentStrategy, ac as SessionNotEligibleError, ad as SessionNotFoundError, ae as SessionStatus, af as SimSwapFailureReason, ag as SimSwapInfo, ai as StepUpOption, aj as StepUpPrepared, ak as StepUpResult, al as StrategyData, am as TS43RequestData, an as TS43StrategyData, ao as Theme, ap as UnauthorizedError, aq as UnsupportedPlatformError, ar as UseCase, as as ValidationError, at as VerificationRecordError, au as VerificationRecordErrorCode, ax as createErrorFromResponse, ay as createLogger, az as defaultHttpClient, aA as noopLogger, aB as resolveConfig, aC as sanitize } from './types-t9HAB-7Q.cjs';
|
|
3
|
+
|
|
4
|
+
interface DeletePasskeysRequest {
|
|
5
|
+
/** E.164 number whose passkeys are deleted. */
|
|
6
|
+
phone_number: string;
|
|
7
|
+
/** A registered https (or localhost) origin of this application: the passkeys' relying party. */
|
|
8
|
+
origin: string;
|
|
9
|
+
}
|
|
10
|
+
interface DeletePasskeysResponse {
|
|
11
|
+
/** Base64url ids of the deleted credentials; empty when there were none. */
|
|
12
|
+
deleted_credential_ids: string[];
|
|
13
|
+
/** The id of this request, the same value as the `X-Request-ID` response header. */
|
|
14
|
+
request_id?: string;
|
|
15
|
+
}
|
|
3
16
|
|
|
4
17
|
/**
|
|
5
18
|
* Request body for device-bound session completion (link protocol only).
|
|
@@ -25,6 +38,18 @@ interface CompleteRequest {
|
|
|
25
38
|
interface CompleteResponse {
|
|
26
39
|
/** Session status after successful device binding validation (always "completed") */
|
|
27
40
|
status: 'completed';
|
|
41
|
+
/**
|
|
42
|
+
* The session this response is about (the key prepare returned), so a result
|
|
43
|
+
* can be stored or logged without the request. Absent from servers older than
|
|
44
|
+
* the release that added it.
|
|
45
|
+
*/
|
|
46
|
+
session_key?: string;
|
|
47
|
+
/**
|
|
48
|
+
* The id of this request, the same value as the `X-Request-ID` response
|
|
49
|
+
* header. Quote it to Glide support. Absent from servers older than the
|
|
50
|
+
* release that added it.
|
|
51
|
+
*/
|
|
52
|
+
request_id?: string;
|
|
28
53
|
}
|
|
29
54
|
/**
|
|
30
55
|
* Returned with HTTP 202 when a desktop (QR) session's wait timer expires
|
|
@@ -46,6 +71,12 @@ interface DesktopWaitResponse {
|
|
|
46
71
|
retry: boolean;
|
|
47
72
|
/** Approximate seconds until the session expires */
|
|
48
73
|
session_expires_in_seconds: number;
|
|
74
|
+
/**
|
|
75
|
+
* The id of this request, the same value as the `X-Request-ID` response
|
|
76
|
+
* header. Quote it to Glide support. Absent from servers older than the
|
|
77
|
+
* release that added it.
|
|
78
|
+
*/
|
|
79
|
+
request_id?: string;
|
|
49
80
|
}
|
|
50
81
|
|
|
51
82
|
/** Request to check authentication eligibility. */
|
|
@@ -54,8 +85,12 @@ interface EligibilityRequest {
|
|
|
54
85
|
phone_number?: string;
|
|
55
86
|
/** PLMN (MCC+MNC). At least one of phone_number or plmn required. */
|
|
56
87
|
plmn?: PLMN;
|
|
57
|
-
/**
|
|
58
|
-
|
|
88
|
+
/**
|
|
89
|
+
* Client info (with a non-blank `user_agent`). Required: eligibility filtering
|
|
90
|
+
* is device-aware and the server rejects a missing `client_info` or blank
|
|
91
|
+
* `user_agent` with 400 VALIDATION_ERROR.
|
|
92
|
+
*/
|
|
93
|
+
client_info: ClientInfo;
|
|
59
94
|
}
|
|
60
95
|
/** Constraints for the device that completes an option (always the phone). */
|
|
61
96
|
interface Requirements {
|
|
@@ -67,6 +102,8 @@ interface Requirements {
|
|
|
67
102
|
android_min_sdk?: number;
|
|
68
103
|
/** Minimum iOS version (App Clip floor for link). */
|
|
69
104
|
ios_min_version?: number;
|
|
105
|
+
/** TS43 from an Android client: `unavailable` on Android Chrome below 156. */
|
|
106
|
+
biometric?: 'available' | 'unavailable';
|
|
70
107
|
/** Forward-compat: any future fields are preserved here. */
|
|
71
108
|
[key: string]: unknown;
|
|
72
109
|
}
|
|
@@ -89,6 +126,121 @@ interface EligibilityResponse {
|
|
|
89
126
|
eligible: boolean;
|
|
90
127
|
/** Available authentication strategy options. */
|
|
91
128
|
available_options: AvailableOption[];
|
|
129
|
+
/**
|
|
130
|
+
* Normalized carrier name for the resolved network. Present only for callers
|
|
131
|
+
* the gateway has explicitly enabled to receive carrier information (the same
|
|
132
|
+
* per-app gate as `/prepare`); omitted otherwise and whenever `eligible` is false.
|
|
133
|
+
*/
|
|
134
|
+
carrier_name?: string;
|
|
135
|
+
/**
|
|
136
|
+
* The id of this request, the same value as the `X-Request-ID` response
|
|
137
|
+
* header. Quote it to Glide support. Absent from servers older than the
|
|
138
|
+
* release that added it.
|
|
139
|
+
*/
|
|
140
|
+
request_id?: string;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Options for `MagicalAuthClient.verifyVerificationRecord`. All optional.
|
|
145
|
+
*/
|
|
146
|
+
interface VerificationRecordOptions {
|
|
147
|
+
/** When set, must equal the record's nonce (the prepare nonce). */
|
|
148
|
+
expectedNonce?: string;
|
|
149
|
+
/**
|
|
150
|
+
* Accept a record past `exp`, for audit of stored records. The record's
|
|
151
|
+
* `iat` must still be within `maxAuditAgeSeconds`.
|
|
152
|
+
*/
|
|
153
|
+
allowExpired?: boolean;
|
|
154
|
+
/** Bounds `iat` when `allowExpired` is set. Missing, zero or negative means 90 days. */
|
|
155
|
+
maxAuditAgeSeconds?: number;
|
|
156
|
+
/** Overrides the expected `iss`. Empty means the client base URL without trailing "/". */
|
|
157
|
+
issuer?: string;
|
|
158
|
+
/** Rejected in addition to the SDK's built-in revoked list. */
|
|
159
|
+
revokedKids?: string[];
|
|
160
|
+
/** The record `aud` to require. Missing or empty means this client's ID. */
|
|
161
|
+
expectedAudience?: string;
|
|
162
|
+
/** When non-empty, the record's `origin` must equal one entry exactly. */
|
|
163
|
+
expectedOrigin?: readonly string[];
|
|
164
|
+
/** Overrides the clock used for claim checks (not the key cache). */
|
|
165
|
+
now?: () => Date;
|
|
166
|
+
}
|
|
167
|
+
/** One entry of the record's `sign_offs` claim. */
|
|
168
|
+
interface VerificationRecordSignOff {
|
|
169
|
+
role: string;
|
|
170
|
+
signer: string;
|
|
171
|
+
status: 'unavailable' | 'present';
|
|
172
|
+
reason?: string;
|
|
173
|
+
format?: string;
|
|
174
|
+
token?: string;
|
|
175
|
+
}
|
|
176
|
+
/** Optional carrier claim on a verified record. */
|
|
177
|
+
interface VerificationRecordCarrier {
|
|
178
|
+
id: string;
|
|
179
|
+
name?: string;
|
|
180
|
+
mvno?: string;
|
|
181
|
+
}
|
|
182
|
+
/** Swap age band in whole hours; -1 means unknown. */
|
|
183
|
+
interface VerificationRecordAgeBand {
|
|
184
|
+
from: number;
|
|
185
|
+
to: number;
|
|
186
|
+
}
|
|
187
|
+
/** The `live_call` claim on records of `call` sessions only. */
|
|
188
|
+
interface VerificationRecordLiveCall {
|
|
189
|
+
status: 'active' | 'none' | 'unavailable';
|
|
190
|
+
carrier_name?: string;
|
|
191
|
+
reason?: string;
|
|
192
|
+
}
|
|
193
|
+
/** A record's `sim_swap` or `device_swap` claim. */
|
|
194
|
+
interface VerificationRecordSwap {
|
|
195
|
+
checked: boolean;
|
|
196
|
+
risk_level?: string;
|
|
197
|
+
age_band?: VerificationRecordAgeBand;
|
|
198
|
+
carrier_name?: string;
|
|
199
|
+
reason?: string;
|
|
200
|
+
swapped?: boolean;
|
|
201
|
+
max_age_hours?: number;
|
|
202
|
+
}
|
|
203
|
+
/** Claims of a verified record, under their wire (snake_case) names. */
|
|
204
|
+
interface VerificationRecordClaims {
|
|
205
|
+
ver: '1.0';
|
|
206
|
+
iss: string;
|
|
207
|
+
sub: string;
|
|
208
|
+
aud: string;
|
|
209
|
+
iat: number;
|
|
210
|
+
nbf: number;
|
|
211
|
+
exp: number;
|
|
212
|
+
jti: string;
|
|
213
|
+
nonce: string;
|
|
214
|
+
origin: string;
|
|
215
|
+
use_case: string;
|
|
216
|
+
verified: boolean;
|
|
217
|
+
strategy?: string;
|
|
218
|
+
phone_number_details?: PhoneNumberDetails;
|
|
219
|
+
carrier?: VerificationRecordCarrier;
|
|
220
|
+
biometric_verification: BiometricVerification;
|
|
221
|
+
sim_swap?: VerificationRecordSwap;
|
|
222
|
+
device_swap?: VerificationRecordSwap;
|
|
223
|
+
live_call?: VerificationRecordLiveCall;
|
|
224
|
+
sign_offs: VerificationRecordSignOff[];
|
|
225
|
+
/** `['carrier']` when the record omits the claim. */
|
|
226
|
+
factors: string[];
|
|
227
|
+
action_hash?: string;
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* How the SDK treated one sign-off: `unavailable` (with the server's reason)
|
|
231
|
+
* or `unverified`. A present sign-off is never treated as carrier trust in
|
|
232
|
+
* this version.
|
|
233
|
+
*/
|
|
234
|
+
interface SignOffResult {
|
|
235
|
+
role: string;
|
|
236
|
+
signer: string;
|
|
237
|
+
result: 'unavailable' | 'unverified';
|
|
238
|
+
reason?: string;
|
|
239
|
+
}
|
|
240
|
+
/** A record whose signature and claims passed every check. */
|
|
241
|
+
interface VerifiedVerificationRecord {
|
|
242
|
+
claims: VerificationRecordClaims;
|
|
243
|
+
signOffResults: SignOffResult[];
|
|
92
244
|
}
|
|
93
245
|
|
|
94
246
|
/**
|
|
@@ -125,6 +277,7 @@ interface RequestOptions {
|
|
|
125
277
|
declare class MagicalAuthClient {
|
|
126
278
|
private readonly config;
|
|
127
279
|
private readonly tokenManager;
|
|
280
|
+
private readonly recordKeys;
|
|
128
281
|
/**
|
|
129
282
|
* Creates a new MagicalAuthClient instance.
|
|
130
283
|
*
|
|
@@ -146,9 +299,10 @@ declare class MagicalAuthClient {
|
|
|
146
299
|
/**
|
|
147
300
|
* Prepares authentication by checking carrier eligibility and generating protocol-specific requests.
|
|
148
301
|
*
|
|
149
|
-
* Automatically generates `fe_code` / `fe_hash` for device binding. If the
|
|
150
|
-
*
|
|
151
|
-
*
|
|
302
|
+
* Automatically generates `fe_code` / `fe_hash` for device binding. If the strategy or
|
|
303
|
+
* its fallback is 'link', `feCode` is included in the result so the caller can set it
|
|
304
|
+
* as an HttpOnly cookie for the link session (`fallback.session` when the fallback is
|
|
305
|
+
* link) via `buildSetBindingCookieHeader()`.
|
|
152
306
|
*
|
|
153
307
|
* @param request - Prepare request parameters
|
|
154
308
|
* @param options - Per-request options (e.g., correlationId)
|
|
@@ -158,6 +312,20 @@ declare class MagicalAuthClient {
|
|
|
158
312
|
* @throws {MagicalAuthError} For other API errors
|
|
159
313
|
*/
|
|
160
314
|
prepare(request: PrepareRequest, options?: RequestOptions): Promise<PrepareResult>;
|
|
315
|
+
/**
|
|
316
|
+
* Prepares authentication for several phone numbers at once.
|
|
317
|
+
*
|
|
318
|
+
* Fans out one ordinary {@link prepare} call per number, so each number gets
|
|
319
|
+
* its own carrier resolution, residency routing and session. Per-number
|
|
320
|
+
* failures are returned as items rather than thrown; this only throws
|
|
321
|
+
* {@link ValidationError}, and only before any request is issued.
|
|
322
|
+
*
|
|
323
|
+
* @param request - Shared prepare fields plus `phone_numbers` (1..10)
|
|
324
|
+
* @param options - Per-request options (e.g., correlationId)
|
|
325
|
+
* @returns One result per input number, in input order
|
|
326
|
+
* @throws {ValidationError} If the list is empty, over the cap, has blank entries, or a shared prepare field is invalid
|
|
327
|
+
*/
|
|
328
|
+
prepareMultiple(request: PrepareMultipleRequest, options?: RequestOptions): Promise<PrepareMultipleResult[]>;
|
|
161
329
|
/**
|
|
162
330
|
* Validates device binding codes and completes a link protocol session.
|
|
163
331
|
*
|
|
@@ -189,6 +357,30 @@ declare class MagicalAuthClient {
|
|
|
189
357
|
* @throws {MagicalAuthError} For other API errors
|
|
190
358
|
*/
|
|
191
359
|
verifyPhoneNumber(request: VerifyPhoneNumberRequest, options?: RequestOptions): Promise<VerifyPhoneNumberResponse>;
|
|
360
|
+
/**
|
|
361
|
+
* Verifies a verification record returned by {@link verifyPhoneNumber}: the
|
|
362
|
+
* ES256 signature against Glide's published record keys, then issuer,
|
|
363
|
+
* the expected audience (default this client's ID), validity window, shape, nonce and origin.
|
|
364
|
+
*
|
|
365
|
+
* A missing or empty record fails with `RECORD_UNAVAILABLE`, so a caller
|
|
366
|
+
* that requires records can pass `response.verification_record` straight in.
|
|
367
|
+
*
|
|
368
|
+
* @param record - Compact JWS from `VerifyPhoneNumberResponse.verification_record`
|
|
369
|
+
* @param options - Expected nonce, expected audience, expected origins, audit mode, issuer override, extra revoked kids, clock
|
|
370
|
+
* @returns The verified claims and how each sign-off was treated
|
|
371
|
+
* @throws {VerificationRecordError} On any failed check; `code` is a {@link VerificationRecordErrorCode}
|
|
372
|
+
*/
|
|
373
|
+
verifyVerificationRecord(record: string | undefined, options?: VerificationRecordOptions): Promise<VerifiedVerificationRecord>;
|
|
374
|
+
/**
|
|
375
|
+
* Verifies a step-up verification record and requires that it is verified,
|
|
376
|
+
* carries both the `passkey` and `carrier` factors, is bound to `action` and
|
|
377
|
+
* is for `phoneNumber` (E.164). The record is accepted past `exp` while its
|
|
378
|
+
* `iat` is within `maxAgeSeconds` (non-finite, zero or negative means 300).
|
|
379
|
+
* `expectedAudience` is the record aud to require; unset means this client's ID.
|
|
380
|
+
*
|
|
381
|
+
* @throws {VerificationRecordError} `EXPIRED` when older than `maxAgeSeconds`, `STEP_UP_REJECTED` when a step-up check fails, or any record verification code
|
|
382
|
+
*/
|
|
383
|
+
verifyStepUp(record: string | undefined, action: Record<string, string>, phoneNumber: string, maxAgeSeconds?: number, expectedAudience?: string): Promise<VerifiedVerificationRecord>;
|
|
192
384
|
/**
|
|
193
385
|
* Retrieves the phone number associated with the device using digital credentials.
|
|
194
386
|
*
|
|
@@ -203,6 +395,17 @@ declare class MagicalAuthClient {
|
|
|
203
395
|
* @throws {MagicalAuthError} For other API errors
|
|
204
396
|
*/
|
|
205
397
|
getPhoneNumber(request: GetPhoneNumberRequest, options?: RequestOptions): Promise<GetPhoneNumberResponse>;
|
|
398
|
+
/**
|
|
399
|
+
* Deletes every passkey Glide holds for the number on origin, a registered origin of this application.
|
|
400
|
+
*
|
|
401
|
+
* @param request - Phone number and origin whose passkeys are deleted
|
|
402
|
+
* @param options - Per-request options (e.g., correlationId)
|
|
403
|
+
* @returns The deleted credential ids; empty when there were none
|
|
404
|
+
* @throws {ValidationError} If phone_number is not E.164 or origin is missing
|
|
405
|
+
* @throws {ForbiddenError} If origin is not registered to this application
|
|
406
|
+
* @throws {MagicalAuthError} For other API errors
|
|
407
|
+
*/
|
|
408
|
+
deletePasskeys(request: DeletePasskeysRequest, options?: RequestOptions): Promise<DeletePasskeysResponse>;
|
|
206
409
|
/**
|
|
207
410
|
* Reports when a user clicks the invoke/authenticate button.
|
|
208
411
|
*
|
|
@@ -281,7 +484,9 @@ declare class TokenManager {
|
|
|
281
484
|
* in progress, subsequent calls will await the same promise.
|
|
282
485
|
*
|
|
283
486
|
* @returns A valid access token
|
|
284
|
-
* @throws {
|
|
487
|
+
* @throws {RateLimitError} If the token endpoint returns 429 (includes Retry-After when present)
|
|
488
|
+
* @throws {ServiceUnavailableError} If the token endpoint returns 5xx or temporarily_unavailable
|
|
489
|
+
* @throws {UnauthorizedError} For other token fetch failures (e.g. 401)
|
|
285
490
|
*/
|
|
286
491
|
getToken(): Promise<string>;
|
|
287
492
|
/**
|
|
@@ -404,6 +609,9 @@ declare function parseBindingCookie(cookieHeader: string | undefined, sessionKey
|
|
|
404
609
|
* @returns Array of Set-Cookie header values that expire stale binding cookies
|
|
405
610
|
*/
|
|
406
611
|
declare function clearStaleBindingCookies(cookieHeader: string | undefined, options?: BindingCookieOptions): string[];
|
|
612
|
+
interface CompletionPageOptions {
|
|
613
|
+
beacon?: boolean;
|
|
614
|
+
}
|
|
407
615
|
/**
|
|
408
616
|
* Returns the HTML for the completion redirect page.
|
|
409
617
|
*
|
|
@@ -412,14 +620,31 @@ declare function clearStaleBindingCookies(cookieHeader: string | undefined, opti
|
|
|
412
620
|
* `_glide_bind_{sessionKey}` HttpOnly cookie), and displays the result.
|
|
413
621
|
*
|
|
414
622
|
* On successful completion, a localStorage signal is written
|
|
415
|
-
* (`glide_signal_{session_key}`) so the FE SDK in the original
|
|
416
|
-
* detect completion via `StorageEvent` without polling
|
|
623
|
+
* (`glide_signal_{session_key}` = session_key) so the FE SDK in the original
|
|
624
|
+
* tab can detect completion via `StorageEvent` without polling, plus a
|
|
625
|
+
* sibling timestamp (`glide_sigmeta_{session_key}` = epoch ms) the FE SDK
|
|
626
|
+
* uses to sweep stale signals. Both keys stay for the session lifetime: the
|
|
627
|
+
* waiting tab may be suspended while the App Clip is in the foreground and
|
|
628
|
+
* must still find the signal when it resumes. The FE SDK removes them on
|
|
629
|
+
* consume; the page only erases them after 10 minutes as a fallback.
|
|
630
|
+
*
|
|
631
|
+
* Pass `{ beacon: true }` to also fire-and-forget same-origin JSON beacons
|
|
632
|
+
* (`page_start`, `invalid_link`, `post_outcome`, `close`, `tab_survived`) to
|
|
633
|
+
* `window.location.pathname`. Default is off. Beacons never include `agg_code`.
|
|
634
|
+
* `close` reports `close_outcome` (`unknown` | `failed`) and never `close_succeeded`.
|
|
417
635
|
*
|
|
418
636
|
* @param completeEndpoint - Relative path to POST to (e.g., "/api/glide/complete")
|
|
637
|
+
* @param options - Optional `{ beacon: true }` to emit page beacons
|
|
419
638
|
* @returns Complete HTML string ready to serve
|
|
420
639
|
* @throws {Error} If completeEndpoint is not a relative path starting with "/"
|
|
421
640
|
*/
|
|
422
|
-
declare function getCompletionPageHtml(completeEndpoint: string): string;
|
|
641
|
+
declare function getCompletionPageHtml(completeEndpoint: string, options?: CompletionPageOptions): string;
|
|
642
|
+
|
|
643
|
+
/**
|
|
644
|
+
* Base64url SHA-256 of the canonical action: keys sorted by byte value, each
|
|
645
|
+
* `key=value`, joined with `|`.
|
|
646
|
+
*/
|
|
647
|
+
declare function actionHash(action: Record<string, string>): string;
|
|
423
648
|
|
|
424
649
|
/**
|
|
425
650
|
* Glide Magical Auth SDK for Node.js
|
|
@@ -470,4 +695,4 @@ declare function getCompletionPageHtml(completeEndpoint: string): string;
|
|
|
470
695
|
*/
|
|
471
696
|
declare const VERSION: string;
|
|
472
697
|
|
|
473
|
-
export { AuthenticationStrategy, type AvailableOption, BINDING_COOKIE_MAX_AGE, BINDING_COOKIE_PREFIX, type BindingCookieOptions, ClientInfo, type CompleteRequest, type CompleteResponse, type DesktopWaitResponse, type EligibilityRequest, type EligibilityResponse, GetPhoneNumberRequest, GetPhoneNumberResponse, HEX_64, HttpClient, Logger, MagicalAuthClient, MagicalAuthConfig, PLMN, PrepareRequest, PrepareResult, ReportInvocationResponse, type RequestOptions, type Requirements, SENSITIVE_KEYS, StatusResponse, TokenManager, VERSION, VerifyPhoneNumberRequest, VerifyPhoneNumberResponse, assertValidFeCode, buildClearBindingCookieHeader, buildSetBindingCookieHeader, clearStaleBindingCookies, computeFeHash, generateFeCode, getBindingCookieName, getCompletionPageHtml, parseBindingCookie };
|
|
698
|
+
export { AuthenticationStrategy, type AvailableOption, BINDING_COOKIE_MAX_AGE, BINDING_COOKIE_PREFIX, type BindingCookieOptions, BiometricVerification, ClientInfo, type CompleteRequest, type CompleteResponse, type CompletionPageOptions, type DeletePasskeysRequest, type DeletePasskeysResponse, type DesktopWaitResponse, type EligibilityRequest, type EligibilityResponse, GetPhoneNumberRequest, GetPhoneNumberResponse, HEX_64, HttpClient, Logger, MagicalAuthClient, MagicalAuthConfig, PLMN, PrepareMultipleRequest, PrepareMultipleResult, PrepareRequest, PrepareResult, ReportInvocationResponse, type RequestOptions, type Requirements, SENSITIVE_KEYS, type SignOffResult, StatusResponse, TokenManager, VERSION, type VerificationRecordAgeBand, type VerificationRecordCarrier, type VerificationRecordClaims, type VerificationRecordLiveCall, type VerificationRecordOptions, type VerificationRecordSignOff, type VerificationRecordSwap, type VerifiedVerificationRecord, VerifyPhoneNumberRequest, VerifyPhoneNumberResponse, actionHash, assertValidFeCode, buildClearBindingCookieHeader, buildSetBindingCookieHeader, clearStaleBindingCookies, computeFeHash, generateFeCode, getBindingCookieName, getCompletionPageHtml, parseBindingCookie };
|