@flonkid/kyc 1.9.2 → 1.9.3
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 +4 -2
- package/dist/chunk-EEHIUYDR.js +1361 -0
- package/dist/chunk-EEHIUYDR.js.map +1 -0
- package/dist/core.cjs +1371 -0
- package/dist/core.cjs.map +1 -0
- package/dist/core.d.cts +294 -0
- package/dist/core.d.ts +294 -0
- package/dist/core.js +3 -0
- package/dist/core.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -294
- package/dist/index.d.ts +3 -294
- package/dist/index.js +3 -1358
- package/dist/index.js.map +1 -1
- package/dist/server.cjs +1 -1
- package/dist/server.cjs.map +1 -1
- package/dist/server.js +1 -1
- package/dist/server.js.map +1 -1
- package/package.json +11 -1
- package/dist/server.d.cts +0 -1029
- package/dist/server.d.ts +0 -1029
- package/dist/types.d.ts +0 -1098
package/README.md
CHANGED
|
@@ -58,8 +58,9 @@ import { FlonkKYCWidget } from '@flonkid/kyc';
|
|
|
58
58
|
```tsx
|
|
59
59
|
import { FlonkKYCWidget } from '@flonkid/kyc';
|
|
60
60
|
|
|
61
|
-
// 1. Create session on your backend first
|
|
62
|
-
|
|
61
|
+
// 1. Create session on your backend first (it returns { sessionId, embedToken,
|
|
62
|
+
// qrCodeUrl } — map the API's `id` to `sessionId`)
|
|
63
|
+
const { sessionId, embedToken, qrCodeUrl } = await fetch('/api/kyc/create-session', {
|
|
63
64
|
method: 'POST',
|
|
64
65
|
body: JSON.stringify({ email: user.email }),
|
|
65
66
|
}).then(r => r.json());
|
|
@@ -69,6 +70,7 @@ const { sessionId, embedToken } = await fetch('/api/kyc/create-session', {
|
|
|
69
70
|
publishableKey="pk_live_..." // optional — instant branded loader (see note)
|
|
70
71
|
sessionId={sessionId}
|
|
71
72
|
embedToken={embedToken}
|
|
73
|
+
qrCodeUrl={qrCodeUrl} // needed for the desktop→mobile QR
|
|
72
74
|
lang="de"
|
|
73
75
|
onSuccess={(result) => console.log('Verified:', result)}
|
|
74
76
|
onError={(error) => console.error(error)}
|