@sparkvault/sdk-js 1.27.0 → 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 +2 -1
- package/dist/sparkvault.cjs.js +55 -37
- package/dist/sparkvault.cjs.js.map +1 -1
- package/dist/sparkvault.esm.js +55 -37
- 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
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
|
package/dist/sparkvault.cjs.js
CHANGED
|
@@ -2726,7 +2726,7 @@ function getStyles(options) {
|
|
|
2726
2726
|
|
|
2727
2727
|
.sv-not-activated-badge-svg {
|
|
2728
2728
|
display: block;
|
|
2729
|
-
filter: drop-shadow(0
|
|
2729
|
+
filter: drop-shadow(0 8px 18px rgba(15, 23, 42, 0.08));
|
|
2730
2730
|
}
|
|
2731
2731
|
|
|
2732
2732
|
.sv-not-activated-title {
|
|
@@ -5053,41 +5053,54 @@ const ACTIVATION_URL = 'https://app.sparkvault.com/products/identity';
|
|
|
5053
5053
|
function createBadge() {
|
|
5054
5054
|
const badge = div('sv-not-activated-badge');
|
|
5055
5055
|
const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
|
|
5056
|
-
svg.setAttribute('viewBox', '0 0
|
|
5056
|
+
svg.setAttribute('viewBox', '0 0 64 64');
|
|
5057
5057
|
svg.setAttribute('width', '72');
|
|
5058
5058
|
svg.setAttribute('height', '72');
|
|
5059
5059
|
svg.setAttribute('fill', 'none');
|
|
5060
|
+
svg.setAttribute('aria-hidden', 'true');
|
|
5060
5061
|
svg.classList.add('sv-not-activated-badge-svg');
|
|
5061
|
-
|
|
5062
|
-
|
|
5063
|
-
|
|
5064
|
-
|
|
5065
|
-
|
|
5066
|
-
|
|
5067
|
-
|
|
5068
|
-
|
|
5069
|
-
|
|
5070
|
-
|
|
5071
|
-
|
|
5072
|
-
|
|
5073
|
-
|
|
5074
|
-
|
|
5075
|
-
|
|
5076
|
-
|
|
5077
|
-
|
|
5078
|
-
|
|
5079
|
-
|
|
5080
|
-
|
|
5081
|
-
|
|
5082
|
-
|
|
5083
|
-
|
|
5084
|
-
|
|
5085
|
-
|
|
5086
|
-
|
|
5087
|
-
|
|
5088
|
-
|
|
5089
|
-
|
|
5090
|
-
|
|
5062
|
+
const surface = document.createElementNS('http://www.w3.org/2000/svg', 'circle');
|
|
5063
|
+
surface.setAttribute('cx', '32');
|
|
5064
|
+
surface.setAttribute('cy', '32');
|
|
5065
|
+
surface.setAttribute('r', '29.5');
|
|
5066
|
+
surface.setAttribute('fill', '#F8FAFC');
|
|
5067
|
+
surface.setAttribute('stroke', '#E2E8F0');
|
|
5068
|
+
surface.setAttribute('stroke-width', '1');
|
|
5069
|
+
svg.appendChild(surface);
|
|
5070
|
+
const panel = document.createElementNS('http://www.w3.org/2000/svg', 'rect');
|
|
5071
|
+
panel.setAttribute('x', '18.5');
|
|
5072
|
+
panel.setAttribute('y', '18.5');
|
|
5073
|
+
panel.setAttribute('width', '27');
|
|
5074
|
+
panel.setAttribute('height', '27');
|
|
5075
|
+
panel.setAttribute('rx', '7');
|
|
5076
|
+
panel.setAttribute('fill', '#FFFFFF');
|
|
5077
|
+
panel.setAttribute('stroke', '#CBD5E1');
|
|
5078
|
+
panel.setAttribute('stroke-width', '1');
|
|
5079
|
+
svg.appendChild(panel);
|
|
5080
|
+
const createLine = (y, x2) => {
|
|
5081
|
+
const line = document.createElementNS('http://www.w3.org/2000/svg', 'path');
|
|
5082
|
+
line.setAttribute('d', `M24 ${y}H${x2}`);
|
|
5083
|
+
line.setAttribute('stroke', '#475569');
|
|
5084
|
+
line.setAttribute('stroke-width', '2');
|
|
5085
|
+
line.setAttribute('stroke-linecap', 'round');
|
|
5086
|
+
svg.appendChild(line);
|
|
5087
|
+
};
|
|
5088
|
+
createLine('26', '40');
|
|
5089
|
+
createLine('32', '40');
|
|
5090
|
+
createLine('38', '35');
|
|
5091
|
+
const createKnob = (cx, cy) => {
|
|
5092
|
+
const knob = document.createElementNS('http://www.w3.org/2000/svg', 'circle');
|
|
5093
|
+
knob.setAttribute('cx', cx);
|
|
5094
|
+
knob.setAttribute('cy', cy);
|
|
5095
|
+
knob.setAttribute('r', '2.5');
|
|
5096
|
+
knob.setAttribute('fill', '#4F46E5');
|
|
5097
|
+
knob.setAttribute('stroke', '#FFFFFF');
|
|
5098
|
+
knob.setAttribute('stroke-width', '1.5');
|
|
5099
|
+
svg.appendChild(knob);
|
|
5100
|
+
};
|
|
5101
|
+
createKnob('30', '26');
|
|
5102
|
+
createKnob('36', '32');
|
|
5103
|
+
createKnob('28', '38');
|
|
5091
5104
|
badge.appendChild(svg);
|
|
5092
5105
|
return badge;
|
|
5093
5106
|
}
|
|
@@ -5199,6 +5212,14 @@ class ProductNotConfiguredView {
|
|
|
5199
5212
|
* Orchestrates view state and rendering for identity verification flows.
|
|
5200
5213
|
* Uses extracted handlers for TOTP and Passkey operations.
|
|
5201
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
|
+
};
|
|
5202
5223
|
class IdentityRenderer {
|
|
5203
5224
|
constructor(container, api, options, callbacks) {
|
|
5204
5225
|
// View management
|
|
@@ -5238,7 +5259,6 @@ class IdentityRenderer {
|
|
|
5238
5259
|
this.callbacks.onSuccess(result);
|
|
5239
5260
|
}
|
|
5240
5261
|
catch (err) {
|
|
5241
|
-
// eslint-disable-next-line no-console
|
|
5242
5262
|
console.warn('[SparkVault SDK] onSuccess threw, continuing to redirect', err);
|
|
5243
5263
|
}
|
|
5244
5264
|
}
|
|
@@ -5645,8 +5665,7 @@ class IdentityRenderer {
|
|
|
5645
5665
|
// CSP blocking WebSocket - provide developer-friendly error
|
|
5646
5666
|
this.setState({
|
|
5647
5667
|
view: 'error',
|
|
5648
|
-
|
|
5649
|
-
code: 'sparklink_csp_blocked',
|
|
5668
|
+
...SPARKLINK_CSP_BLOCKED_ERROR,
|
|
5650
5669
|
});
|
|
5651
5670
|
}
|
|
5652
5671
|
else {
|
|
@@ -6154,8 +6173,7 @@ class IdentityRenderer {
|
|
|
6154
6173
|
if (wsResult.error === 'csp') {
|
|
6155
6174
|
this.setState({
|
|
6156
6175
|
view: 'error',
|
|
6157
|
-
|
|
6158
|
-
code: 'sparklink_csp_blocked',
|
|
6176
|
+
...SPARKLINK_CSP_BLOCKED_ERROR,
|
|
6159
6177
|
});
|
|
6160
6178
|
}
|
|
6161
6179
|
else {
|