@sparkvault/sdk 1.23.4 → 1.23.6

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.
@@ -782,7 +782,7 @@ class IdentityApi {
782
782
  *
783
783
  * Returns:
784
784
  * - email_valid: whether the email domain has valid MX records
785
- * - hasPasskey: whether any passkeys are registered (only meaningful if email_valid)
785
+ * - has_passkey: whether any passkeys are registered (only meaningful if email_valid)
786
786
  */
787
787
  async checkPasskey(email) {
788
788
  return this.request('POST', '/passkey/check', { email });
@@ -803,6 +803,7 @@ class IdentityApi {
803
803
  success_url: authContext.simpleMode.successUrl,
804
804
  failure_url: authContext.simpleMode.failureUrl,
805
805
  state: authContext.simpleMode.state,
806
+ session_id: authContext.simpleMode.sessionId,
806
807
  };
807
808
  }
808
809
  return params;
@@ -1278,10 +1279,10 @@ class PasskeyHandler {
1278
1279
  async checkPasskey() {
1279
1280
  try {
1280
1281
  const response = await this.api.checkPasskey(this.state.recipient);
1281
- this.state.setPasskeyStatus(response.hasPasskey);
1282
+ this.state.setPasskeyStatus(response.has_passkey);
1282
1283
  return {
1283
1284
  emailValid: response.email_valid,
1284
- hasPasskey: response.hasPasskey,
1285
+ hasPasskey: response.has_passkey,
1285
1286
  };
1286
1287
  }
1287
1288
  catch (error) {
@@ -1324,12 +1325,12 @@ class PasskeyHandler {
1324
1325
  params.set('auth_request_id', authContext.authRequestId);
1325
1326
  }
1326
1327
  if (authContext?.simpleMode) {
1327
- params.set('simple_mode', 'true');
1328
- params.set('success_url', authContext.simpleMode.successUrl);
1329
- params.set('failure_url', authContext.simpleMode.failureUrl);
1330
- if (authContext.simpleMode.state) {
1331
- params.set('state', authContext.simpleMode.state);
1332
- }
1328
+ params.set('simple_mode', JSON.stringify({
1329
+ success_url: authContext.simpleMode.successUrl,
1330
+ failure_url: authContext.simpleMode.failureUrl,
1331
+ state: authContext.simpleMode.state,
1332
+ session_id: authContext.simpleMode.sessionId,
1333
+ }));
1333
1334
  }
1334
1335
  const popupUrl = `${this.baseUrl}/${this.accountId}/passkey/popup?${params}`;
1335
1336
  // Calculate popup position (centered)