@soliton-id/web-sdk 1.0.1 → 1.0.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.
Potentially problematic release.
This version of @soliton-id/web-sdk might be problematic. Click here for more details.
- package/CHANGELOG.md +16 -0
- package/README.md +40 -21
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,22 @@ All notable changes to `@soliton-id/web-sdk`. The `soliton-v1` postMessage
|
|
|
4
4
|
protocol is frozen: changes are additive only, so older SDK versions keep
|
|
5
5
|
working against the hosted flow.
|
|
6
6
|
|
|
7
|
+
## 1.0.2 — 2026-08-06
|
|
8
|
+
|
|
9
|
+
Documentation only. No runtime, API, or bundle changes; `soliton-v1` is
|
|
10
|
+
unchanged and `1.0.0`/`1.0.1` remain fully compatible.
|
|
11
|
+
|
|
12
|
+
- Reframed `sk_test_` as the **sandbox environment** rather than a
|
|
13
|
+
fixtures-only mode. A sandbox credential now runs real captures; the
|
|
14
|
+
deterministic `pass` / `fail` / `partial` fixtures remain available and
|
|
15
|
+
remain sandbox-only. `sk_live_` still cannot request a fixture.
|
|
16
|
+
- Documented that redirect domains, iframe origins, and webhook endpoints are
|
|
17
|
+
registered per environment, so a staging origin can embed sandbox links
|
|
18
|
+
without being able to embed production ones, and each environment's webhook
|
|
19
|
+
has its own signing secret.
|
|
20
|
+
- Documented the additive `environment` field on the create response, every
|
|
21
|
+
status read, and every webhook payload.
|
|
22
|
+
|
|
7
23
|
## 1.0.1 — 2026-08-02
|
|
8
24
|
|
|
9
25
|
Documentation only. No runtime, API, or bundle changes; `soliton-v1` is
|
package/README.md
CHANGED
|
@@ -92,7 +92,7 @@ BACKEND with your API key:
|
|
|
92
92
|
user, selected server-side from the capture under neutral lighting.
|
|
93
93
|
Returns 404 until the verification is complete or when no acceptable
|
|
94
94
|
portrait frame existed. Right after completion, `portrait_available` can
|
|
95
|
-
briefly read `false` while extraction finishes; once status is `
|
|
95
|
+
briefly read `false` while extraction finishes; once status is `completed`
|
|
96
96
|
just fetch the portrait and treat a 404 after one short retry as final.
|
|
97
97
|
|
|
98
98
|
Your page and the SDK never see the verdict or the portrait: callbacks and
|
|
@@ -122,12 +122,16 @@ Embedding is off by default and gated on BOTH layers:
|
|
|
122
122
|
|
|
123
123
|
1. Your Soliton account must have the exact origin of each page that runs the
|
|
124
124
|
SDK and directly contains its Soliton iframe registered (scheme + host +
|
|
125
|
-
port, e.g. `https://app.example.com`)
|
|
126
|
-
have to be the browser's
|
|
125
|
+
port, e.g. `https://app.example.com`), **for the environment that will open
|
|
126
|
+
the link**. This direct-parent page does not have to be the browser's
|
|
127
|
+
top-level page. A link is checked against the origins registered for the
|
|
128
|
+
environment of the key that created it, so `https://dev.example.com` can be
|
|
129
|
+
a sandbox embedder without becoming a production one.
|
|
127
130
|
2. The direct-parent origin must also be present in the soliton.id deploy-time
|
|
128
131
|
`frame-ancestors` allowlist. If the SDK page is itself framed, every origin
|
|
129
132
|
above it in the frame chain must be present there too (we manage this
|
|
130
|
-
allowlist).
|
|
133
|
+
allowlist). This layer is one list for the whole deployment and is not per
|
|
134
|
+
environment; the per-environment precision comes from layer 1.
|
|
131
135
|
|
|
132
136
|
A verification link opened inside an iframe with any other direct-parent
|
|
133
137
|
origin refuses to start and reports `origin_not_allowed`.
|
|
@@ -190,11 +194,21 @@ soliton.id. Do not add Soliton to your page's `frame-ancestors`: that directive
|
|
|
190
194
|
controls who may frame your page, while `frame-src` controls what your page may
|
|
191
195
|
frame.
|
|
192
196
|
|
|
193
|
-
##
|
|
197
|
+
## Sandbox
|
|
194
198
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
199
|
+
Your account has two environments and the API key prefix selects one:
|
|
200
|
+
`sk_live_` is **production**, `sk_test_` is **sandbox**. Each has its own
|
|
201
|
+
credentials, verifications, redirect domains, iframe origins, and webhook
|
|
202
|
+
endpoint with its own signing secret.
|
|
203
|
+
|
|
204
|
+
A sandbox verification opens in the overlay exactly like a production one and
|
|
205
|
+
runs the same real capture — but it is checked against the iframe origins
|
|
206
|
+
registered for **sandbox**, so your staging page can embed sandbox links
|
|
207
|
+
without being able to embed production ones. Register each origin for the
|
|
208
|
+
environment that will use it.
|
|
209
|
+
|
|
210
|
+
Sandbox is additionally the only place that can request a fixed outcome, which
|
|
211
|
+
is the practical way to exercise your `partial` branch:
|
|
198
212
|
|
|
199
213
|
```jsonc
|
|
200
214
|
// POST /api/v1/verifications with an sk_test_ key
|
|
@@ -207,21 +221,20 @@ names the outcome when it creates the verification:
|
|
|
207
221
|
| `partial` | `true` | `true` |
|
|
208
222
|
| `fail` | `false` | `false` |
|
|
209
223
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
the practical way to exercise your `partial` branch, which is awkward to
|
|
214
|
-
trigger with a real capture.
|
|
224
|
+
A fixture's URL opens in the overlay and fires `onComplete` the same way, but
|
|
225
|
+
never requests camera permission and never records anything. The hosted page
|
|
226
|
+
marks itself as synthetic on screen.
|
|
215
227
|
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
228
|
+
Fixtures do not exercise liveness, anti-spoof, or anti-deepfake logic, and
|
|
229
|
+
simulate no errors or timeouts — only the three terminal verdicts. Real
|
|
230
|
+
sandbox captures do run the full pipeline; a production `sk_live_` key cannot
|
|
231
|
+
request fixtures at all.
|
|
219
232
|
|
|
220
|
-
The two
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
(`biometric` or `synthetic_test_fixture`) — assert
|
|
224
|
-
a real verdict matters.
|
|
233
|
+
The two environments are strictly isolated: neither credential can read the
|
|
234
|
+
other's verifications, even within one account. Every create response, status
|
|
235
|
+
read, and webhook carries `environment` (`sandbox` or `production`) and
|
|
236
|
+
`result_source` (`biometric` or `synthetic_test_fixture`) — assert both
|
|
237
|
+
anywhere a real production verdict matters.
|
|
225
238
|
|
|
226
239
|
## Completion webhooks
|
|
227
240
|
|
|
@@ -233,6 +246,12 @@ deduplicate on `X-Soliton-Event-Id`, and respond `2xx` within 5 seconds. Full
|
|
|
233
246
|
setup, the signature recipe, and retry semantics are in the
|
|
234
247
|
[integration guide](https://soliton.id/docs/integration).
|
|
235
248
|
|
|
249
|
+
Webhooks are configured per environment: one endpoint for sandbox and one for
|
|
250
|
+
production, each with its own signing secret. A sandbox completion is only ever
|
|
251
|
+
delivered to the sandbox endpoint, so a staging receiver cannot validate — or
|
|
252
|
+
forge — a production event. The payload's `environment` field tells you which
|
|
253
|
+
is which if you point both at one URL.
|
|
254
|
+
|
|
236
255
|
## How it works
|
|
237
256
|
|
|
238
257
|
`open()` accepts hosted URLs from `https://soliton.id`. When Soliton has
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"//": "Publishable manifest for the npm Web SDK. No devDependencies and no own node_modules by design: every build runs from the next-app root with its existing toolchain (npm run build:sdk), so the lockfile never grows for packaging. dist/ is rebuilt automatically by the prepack hook and is not committed.",
|
|
3
3
|
"name": "@soliton-id/web-sdk",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.2",
|
|
5
5
|
"description": "Soliton identity verification for the browser: opens the hosted verification flow in a full-viewport overlay iframe on your page and reports lifecycle events. Verdicts and portraits are fetched by your backend, never exposed in the browser.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "Soliton",
|