@sparkvault/sdk-js 1.27.1 → 1.27.2

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.
@@ -5208,6 +5208,14 @@ class ProductNotConfiguredView {
5208
5208
  * Orchestrates view state and rendering for identity verification flows.
5209
5209
  * Uses extracted handlers for TOTP and Passkey operations.
5210
5210
  */
5211
+ const SPARKLINK_CSP_BLOCKED_ERROR = {
5212
+ message: [
5213
+ 'Connection blocked by security policy.',
5214
+ 'Please contact the site administrator to add wss://ws.sparkvault.com',
5215
+ 'to the Content-Security-Policy connect-src directive.',
5216
+ ].join(' '),
5217
+ code: 'sparklink_csp_blocked',
5218
+ };
5211
5219
  class IdentityRenderer {
5212
5220
  constructor(container, api, options, callbacks) {
5213
5221
  // View management
@@ -5247,7 +5255,6 @@ class IdentityRenderer {
5247
5255
  this.callbacks.onSuccess(result);
5248
5256
  }
5249
5257
  catch (err) {
5250
- // eslint-disable-next-line no-console
5251
5258
  console.warn('[SparkVault SDK] onSuccess threw, continuing to redirect', err);
5252
5259
  }
5253
5260
  }
@@ -5654,8 +5661,7 @@ class IdentityRenderer {
5654
5661
  // CSP blocking WebSocket - provide developer-friendly error
5655
5662
  this.setState({
5656
5663
  view: 'error',
5657
- message: 'Connection blocked by security policy. Please contact the site administrator to add wss://*.sparkvault.com to the Content-Security-Policy connect-src directive.',
5658
- code: 'sparklink_csp_blocked',
5664
+ ...SPARKLINK_CSP_BLOCKED_ERROR,
5659
5665
  });
5660
5666
  }
5661
5667
  else {
@@ -6163,8 +6169,7 @@ class IdentityRenderer {
6163
6169
  if (wsResult.error === 'csp') {
6164
6170
  this.setState({
6165
6171
  view: 'error',
6166
- message: 'Connection blocked by security policy. Please contact the site administrator to add wss://*.sparkvault.com to the Content-Security-Policy connect-src directive.',
6167
- code: 'sparklink_csp_blocked',
6172
+ ...SPARKLINK_CSP_BLOCKED_ERROR,
6168
6173
  });
6169
6174
  }
6170
6175
  else {