@pelican-identity/react 2.0.16 β†’ 2.0.18

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
@@ -144,25 +144,21 @@ Main authentication component.
144
144
  | `forceQRCode` | `boolean` | Optional | Always show QR code instead of deep link |
145
145
  | `continuousMode` | `boolean` | Optional | Automatically restart auth after completion |
146
146
 
147
- > If `publicKey` or `projectId` is invalid, Pelican will fail immediately.
147
+ > If `appId` is missing or does not match the whitelisted value, Pelican will fail immediately.
148
148
 
149
- ## πŸ‘‰ **Pelican Dashboard:** https://dash.pelicanidentity.com
149
+ ### Best practice
150
150
 
151
- ## Authentication Flow
152
-
153
- Pelican Web authentication works using:
154
-
155
- - **QR codes** (desktop β†’ mobile)
156
- - **Deep links** (mobile browsers)
157
-
158
- The SDK automatically chooses the best option based on the user’s device.
151
+ Fetch your Pelican configuration (public key, project ID) from your backend at runtime instead of hard-coding them into your mobile app.
152
+ πŸ‘‰ **Pelican Dashboard:** https://dash.pelicanidentity.com
159
153
 
160
154
  ---
161
155
 
162
- ## Authentication Response
156
+ # Authentication Response
163
157
 
164
158
  When authentication completes successfully, Pelican returns a structured **identity result** to your application via the `onSuccess` callback.
165
159
 
160
+ This response contains a **deterministic user identifier** for your business, along with optional verified user data and identity verification (KYC) information depending on the authentication flow used.
161
+
166
162
  ---
167
163
 
168
164
  ## Success Callback
@@ -180,6 +176,10 @@ interface IdentityResult {
180
176
  /** Deterministic unique user identifier specific to your business */
181
177
  user_id: string;
182
178
 
179
+ /** Authentication Assurance level */
180
+ /** AAL1 - Passcode */
181
+ /** AAL2 - Biometric */
182
+ assurance_level: { level: number; type: "passcode" | "biometric" };
183
183
  /** Basic user profile and contact information (if available) */
184
184
  user_data?: IUserData;
185
185
 
@@ -203,8 +203,21 @@ interface IdentityResult {
203
203
  - Safe to store and use as your internal user reference.
204
204
  - Does **not** expose personally identifiable information (PII).
205
205
 
206
+ > This identifier remains the same for the same user across future authentications within your business.
207
+
206
208
  ---
207
209
 
210
+ ## Assurance Level (`assurance_level`)
211
+
212
+ Pelican will prompt users to authenticate using the required assurance level configured in the project settings when possible. Authentication may still succeed with a lower level, but the achieved assurance level is always returned in the response. Your application is responsible for enforcing access based on this level.
213
+
214
+ ```ts
215
+ interface AssuranceLevel {
216
+ level: number;
217
+ type: "passcode" | "biometric";
218
+ }
219
+ ```
220
+
208
221
  ## User Data (`user_data`)
209
222
 
210
223
  Returned when available and permitted by the authentication flow.
@@ -228,7 +241,31 @@ interface IUserData {
228
241
  }
229
242
  ```
230
243
 
231
- All contact data returned by Pelican is **verified**.
244
+ ### Email
245
+
246
+ ```ts
247
+ interface IEmail {
248
+ id: number;
249
+ value: string;
250
+ verifiedAt: string;
251
+ verificationProvider: string;
252
+ }
253
+ ```
254
+
255
+ ### Phone
256
+
257
+ ```ts
258
+ interface IPhone {
259
+ id: number;
260
+ country: string;
261
+ callingCode: string;
262
+ number: string;
263
+ verifiedAt: string;
264
+ verificationProvider: string;
265
+ }
266
+ ```
267
+
268
+ All contact data returned by Pelican is **verified** and includes the service used for verification.
232
269
 
233
270
  ---
234
271
 
@@ -246,12 +283,50 @@ interface IKycData {
246
283
  | "driver's license"
247
284
  | "residence permit";
248
285
  document_number?: string;
249
- nationality?: string;
286
+ personal_number?: string;
287
+ date_of_birth?: string | Date;
250
288
  age?: number;
289
+ expiration_date?: string | Date;
290
+ date_of_issue?: string | Date;
291
+ issuing_state?: string;
292
+ issuing_state_name?: string;
293
+ first_name?: string;
294
+ last_name?: string;
295
+ full_name?: string;
296
+ gender?: string;
297
+ address?: string;
298
+ formatted_address?: string;
299
+ nationality?: string;
300
+ liveness_percentage?: number;
301
+ face_match_percentage?: number;
251
302
  verified_at?: string | Date;
252
303
  }
253
304
  ```
254
305
 
306
+ ### Verification Scores
307
+
308
+ - `liveness_percentage`: Confidence score (0–100) from face liveness detection.
309
+ - `face_match_percentage`: Confidence score (0–100) matching selfie to document photo.
310
+
311
+ ---
312
+
313
+ ## Document Downloads
314
+
315
+ If document access is enabled for your project (NB: your business must be verified and KYB completed), Pelican provides secure download URLs valid for 24 hours as Pelican does not store documents and only provides access to them from the Pelican vault for a limited time. You are required to download and store the documents on your backend for compliance and security reasons according to your local data protection regulations:
316
+
317
+ ```ts
318
+ id_downloadurls?: {
319
+ front_of_card?: string;
320
+ back_of_card?: string;
321
+ };
322
+ ```
323
+
324
+ These URLs are:
325
+
326
+ - Short-lived
327
+ - Access-controlled
328
+ - Intended for secure backend or compliance workflows
329
+
255
330
  ---
256
331
 
257
332
  ## Authentication Flow Differences
@@ -259,7 +334,7 @@ interface IKycData {
259
334
  | Auth Type | Returned Data |
260
335
  | ----------------- | ------------------------------------------- |
261
336
  | `signup` | `user_id`, basic `user_data` |
262
- | `login` | `user_id` |
337
+ | `login` | `user_id`, previously generated at signup |
263
338
  | `id-verification` | `user_id`, `id_verification`, document URLs |
264
339
 
265
340
  Returned fields depend on:
@@ -270,6 +345,8 @@ Returned fields depend on:
270
345
 
271
346
  ---
272
347
 
348
+ ---
349
+
273
350
  ## Troubleshooting
274
351
 
275
352
  ### Blank page or no QR code
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PelicanAuth.d.ts","sourceRoot":"","sources":["../../src/components/PelicanAuth.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAElE,QAAA,MAAM,WAAW,GAAI,QAAQ,mBAAmB,4CA6hB/C,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PelicanButton.d.ts","sourceRoot":"","sources":["../../src/components/PelicanButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAEvD,QAAA,MAAM,aAAa,GAAI,qBAGpB;IACD,QAAQ,EAAE,QAAQ,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,4CA+EA,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePelicanAuth.d.ts","sourceRoot":"","sources":["../../src/hooks/usePelicanAuth.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,gBAAgB,EAChB,mBAAmB,EACpB,MAAM,6BAA6B,CAAC;AAGrC,eAAO,MAAM,cAAc,GAAI,QAAQ,mBAAmB;;;;;;;;;;CAgEzD,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAElE,mBAAmB,6BAA6B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pelican-identity/react",
3
- "version": "2.0.16",
3
+ "version": "2.0.18",
4
4
  "description": "React components for Pelican Identity authentication",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -21,7 +21,7 @@
21
21
  "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0"
22
22
  },
23
23
  "dependencies": {
24
- "@pelican-identity/auth-core": "1.2.14"
24
+ "@pelican-identity/auth-core": "1.2.16"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@types/react": "^19.0.4",