@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.
package/README.md CHANGED
@@ -305,7 +305,8 @@ app.post('/api/auth/login', async (req, res) => {
305
305
 
306
306
  const { payload } = await jose.jwtVerify(token, JWKS, {
307
307
  issuer: `${IDENTITY_URL}/${ACCOUNT_ID}`,
308
- audience: ACCOUNT_ID
308
+ audience: ACCOUNT_ID,
309
+ algorithms: ['EdDSA']
309
310
  });
310
311
 
311
312
  // Token is valid! Create user session
@@ -5212,6 +5212,14 @@ class ProductNotConfiguredView {
5212
5212
  * Orchestrates view state and rendering for identity verification flows.
5213
5213
  * Uses extracted handlers for TOTP and Passkey operations.
5214
5214
  */
5215
+ const SPARKLINK_CSP_BLOCKED_ERROR = {
5216
+ message: [
5217
+ 'Connection blocked by security policy.',
5218
+ 'Please contact the site administrator to add wss://ws.sparkvault.com',
5219
+ 'to the Content-Security-Policy connect-src directive.',
5220
+ ].join(' '),
5221
+ code: 'sparklink_csp_blocked',
5222
+ };
5215
5223
  class IdentityRenderer {
5216
5224
  constructor(container, api, options, callbacks) {
5217
5225
  // View management
@@ -5251,7 +5259,6 @@ class IdentityRenderer {
5251
5259
  this.callbacks.onSuccess(result);
5252
5260
  }
5253
5261
  catch (err) {
5254
- // eslint-disable-next-line no-console
5255
5262
  console.warn('[SparkVault SDK] onSuccess threw, continuing to redirect', err);
5256
5263
  }
5257
5264
  }
@@ -5658,8 +5665,7 @@ class IdentityRenderer {
5658
5665
  // CSP blocking WebSocket - provide developer-friendly error
5659
5666
  this.setState({
5660
5667
  view: 'error',
5661
- message: 'Connection blocked by security policy. Please contact the site administrator to add wss://*.sparkvault.com to the Content-Security-Policy connect-src directive.',
5662
- code: 'sparklink_csp_blocked',
5668
+ ...SPARKLINK_CSP_BLOCKED_ERROR,
5663
5669
  });
5664
5670
  }
5665
5671
  else {
@@ -6167,8 +6173,7 @@ class IdentityRenderer {
6167
6173
  if (wsResult.error === 'csp') {
6168
6174
  this.setState({
6169
6175
  view: 'error',
6170
- message: 'Connection blocked by security policy. Please contact the site administrator to add wss://*.sparkvault.com to the Content-Security-Policy connect-src directive.',
6171
- code: 'sparklink_csp_blocked',
6176
+ ...SPARKLINK_CSP_BLOCKED_ERROR,
6172
6177
  });
6173
6178
  }
6174
6179
  else {