@sparkvault/sdk 1.23.3 → 1.23.5

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.
@@ -15,6 +15,8 @@ export interface AuthContext {
15
15
  successUrl: string;
16
16
  failureUrl: string;
17
17
  state?: string;
18
+ /** Opaque server-side verify session backing success/failure URLs */
19
+ sessionId?: string;
18
20
  };
19
21
  }
20
22
  export interface VerifyOptions {
package/dist/index.d.ts CHANGED
@@ -42,6 +42,8 @@ interface AuthContext {
42
42
  successUrl: string;
43
43
  failureUrl: string;
44
44
  state?: string;
45
+ /** Opaque server-side verify session backing success/failure URLs */
46
+ sessionId?: string;
45
47
  };
46
48
  }
47
49
  interface VerifyOptions {
@@ -807,6 +807,7 @@ class IdentityApi {
807
807
  success_url: authContext.simpleMode.successUrl,
808
808
  failure_url: authContext.simpleMode.failureUrl,
809
809
  state: authContext.simpleMode.state,
810
+ session_id: authContext.simpleMode.sessionId,
810
811
  };
811
812
  }
812
813
  return params;
@@ -1328,12 +1329,12 @@ class PasskeyHandler {
1328
1329
  params.set('auth_request_id', authContext.authRequestId);
1329
1330
  }
1330
1331
  if (authContext?.simpleMode) {
1331
- params.set('simple_mode', 'true');
1332
- params.set('success_url', authContext.simpleMode.successUrl);
1333
- params.set('failure_url', authContext.simpleMode.failureUrl);
1334
- if (authContext.simpleMode.state) {
1335
- params.set('state', authContext.simpleMode.state);
1336
- }
1332
+ params.set('simple_mode', JSON.stringify({
1333
+ success_url: authContext.simpleMode.successUrl,
1334
+ failure_url: authContext.simpleMode.failureUrl,
1335
+ state: authContext.simpleMode.state,
1336
+ session_id: authContext.simpleMode.sessionId,
1337
+ }));
1337
1338
  }
1338
1339
  const popupUrl = `${this.baseUrl}/${this.accountId}/passkey/popup?${params}`;
1339
1340
  // Calculate popup position (centered)
@@ -1967,6 +1968,21 @@ function getStyles(options) {
1967
1968
  text-align: left;
1968
1969
  padding: 12px 14px;
1969
1970
  margin-bottom: 8px;
1971
+ /* Inset 2px on either side so the focus outline (drawn outside the
1972
+ border-box) has room to render without clipping against the
1973
+ dialog's container edges. width:auto pairs with this to prevent
1974
+ the row from forcing horizontal overflow. */
1975
+ margin-left: 2px;
1976
+ margin-right: 2px;
1977
+ width: calc(100% - 4px);
1978
+ }
1979
+
1980
+ /* The shared .sv-btn focus rule sets outline-offset:2px which sits
1981
+ outside the row's edges and gets clipped by the parent. Method
1982
+ rows are full-width by design, so render the focus indicator
1983
+ flush against the border instead. */
1984
+ .sv-btn-method:focus-visible {
1985
+ outline-offset: 0;
1970
1986
  }
1971
1987
 
1972
1988
  .sv-btn-method:hover:not(:disabled) {