@sparkvault/sdk-js 8.6.0 → 8.6.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/dist/products/identity/popup-launcher.d.ts +4 -3
- package/dist/sparkvault.cjs.js +15 -4
- package/dist/sparkvault.cjs.js.map +1 -1
- package/dist/sparkvault.esm.js +15 -4
- package/dist/sparkvault.esm.js.map +1 -1
- package/dist/sparkvault.js +1 -1
- package/dist/sparkvault.js.map +1 -1
- package/package.json +1 -1
|
@@ -9,8 +9,9 @@
|
|
|
9
9
|
*
|
|
10
10
|
* The single transfer path: synchronous `window.open` inside the user gesture
|
|
11
11
|
* (so the browser never blocks it), strict `event.origin` + `data.type`
|
|
12
|
-
* validation against the caller-supplied trusted origin, a
|
|
13
|
-
* `window.closed` poll that surfaces a manual
|
|
12
|
+
* validation against the caller-supplied trusted origin, a 30-minute
|
|
13
|
+
* abandoned-window backstop, and a `window.closed` poll that surfaces a manual
|
|
14
|
+
* close as a cancellation.
|
|
14
15
|
*/
|
|
15
16
|
/** Minimal shape every popup result envelope shares. */
|
|
16
17
|
export interface PopupResultEnvelope {
|
|
@@ -30,7 +31,7 @@ export interface OpenPopupOptions {
|
|
|
30
31
|
width?: number;
|
|
31
32
|
/** Popup height in px (default 640). */
|
|
32
33
|
height?: number;
|
|
33
|
-
/** Timeout in ms before giving up and closing the popup (default
|
|
34
|
+
/** Timeout in ms before giving up and closing the popup (default 30 minutes). */
|
|
34
35
|
timeoutMs?: number;
|
|
35
36
|
/**
|
|
36
37
|
* Called synchronously with the popup window the moment it opens, so the
|
package/dist/sparkvault.cjs.js
CHANGED
|
@@ -1351,14 +1351,25 @@ class VerificationState {
|
|
|
1351
1351
|
*
|
|
1352
1352
|
* The single transfer path: synchronous `window.open` inside the user gesture
|
|
1353
1353
|
* (so the browser never blocks it), strict `event.origin` + `data.type`
|
|
1354
|
-
* validation against the caller-supplied trusted origin, a
|
|
1355
|
-
* `window.closed` poll that surfaces a manual
|
|
1354
|
+
* validation against the caller-supplied trusted origin, a 30-minute
|
|
1355
|
+
* abandoned-window backstop, and a `window.closed` poll that surfaces a manual
|
|
1356
|
+
* close as a cancellation.
|
|
1356
1357
|
*/
|
|
1357
1358
|
/** Default popup dimensions — a centered login/ceremony window. */
|
|
1358
1359
|
const DEFAULT_WIDTH = 480;
|
|
1359
1360
|
const DEFAULT_HEIGHT = 640;
|
|
1360
|
-
/**
|
|
1361
|
-
|
|
1361
|
+
/**
|
|
1362
|
+
* Default timeout for popup operations: 30 minutes. This is an
|
|
1363
|
+
* abandoned-window backstop — never a liveness gate. A person mid-login is
|
|
1364
|
+
* often slow for legitimate reasons (waiting out an OTP resend backoff,
|
|
1365
|
+
* fetching their phone for a cross-device passkey, hunting for an alternative
|
|
1366
|
+
* method), and yanking the window away from them mid-flow is far worse than
|
|
1367
|
+
* letting an orphaned promise linger. Active cancellation is handled
|
|
1368
|
+
* elsewhere: the `window.closed` poll catches a manual close within 500ms and
|
|
1369
|
+
* an explicit in-popup cancel posts back immediately; server-side challenge
|
|
1370
|
+
* TTLs (OTP expiry, auth-request lifetime) bound how stale a completion can be.
|
|
1371
|
+
*/
|
|
1372
|
+
const DEFAULT_TIMEOUT_MS = 30 * 60 * 1000;
|
|
1362
1373
|
/** How often to check whether the user closed the popup manually. */
|
|
1363
1374
|
const CLOSED_POLL_INTERVAL_MS = 500;
|
|
1364
1375
|
/**
|