@sparkvault/sdk-mobile 4.1.1 → 4.3.0
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 +6 -4
- package/dist/types.d.ts +14 -0
- package/package.json +2 -2
- package/src/types.ts +14 -0
package/README.md
CHANGED
|
@@ -94,10 +94,10 @@ const passkeyProvider: MobilePasskeyProvider = {
|
|
|
94
94
|
isSupported: () => Passkey.isSupported(),
|
|
95
95
|
authenticate: async (options) => {
|
|
96
96
|
const credential = await Passkey.get({
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
97
|
+
challenge: options.challenge,
|
|
98
|
+
timeout: options.timeout,
|
|
99
|
+
rpId: options.rpId,
|
|
100
|
+
userVerification: options.userVerification,
|
|
101
101
|
});
|
|
102
102
|
|
|
103
103
|
return credential
|
|
@@ -109,6 +109,8 @@ const passkeyProvider: MobilePasskeyProvider = {
|
|
|
109
109
|
clientDataJSON: credential.response.clientDataJSON,
|
|
110
110
|
authenticatorData: credential.response.authenticatorData,
|
|
111
111
|
signature: credential.response.signature,
|
|
112
|
+
// Required: the server resolves the SVID from the userHandle.
|
|
113
|
+
userHandle: credential.response.userHandle,
|
|
112
114
|
},
|
|
113
115
|
}
|
|
114
116
|
: null;
|
package/dist/types.d.ts
CHANGED
|
@@ -351,6 +351,11 @@ export interface PasskeyRegisterChallenge {
|
|
|
351
351
|
options: PasskeyRegisterOptions;
|
|
352
352
|
session: PasskeySession;
|
|
353
353
|
}
|
|
354
|
+
/**
|
|
355
|
+
* JSON-encoded WebAuthn credential returned by a native passkey provider,
|
|
356
|
+
* shared by authentication assertions (`authenticatorData`/`signature`) and
|
|
357
|
+
* registration attestations (`attestationObject`).
|
|
358
|
+
*/
|
|
354
359
|
export interface PasskeyCredential {
|
|
355
360
|
id: string;
|
|
356
361
|
rawId: string;
|
|
@@ -359,6 +364,15 @@ export interface PasskeyCredential {
|
|
|
359
364
|
authenticatorData?: string;
|
|
360
365
|
signature?: string;
|
|
361
366
|
attestationObject?: string;
|
|
367
|
+
/**
|
|
368
|
+
* Base64url user handle from an authentication assertion. Optional only
|
|
369
|
+
* because this shape also carries registration attestations, which have
|
|
370
|
+
* no user handle (matching the native lib's `userHandle?: string`).
|
|
371
|
+
* Verification requires it: the Identity server resolves the SVID solely
|
|
372
|
+
* from this value (`allowCredentials` is just an authenticator hint), so
|
|
373
|
+
* providers must pass it through verbatim on authenticate.
|
|
374
|
+
*/
|
|
375
|
+
userHandle?: string;
|
|
362
376
|
};
|
|
363
377
|
type: 'public-key';
|
|
364
378
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sparkvault/sdk-mobile",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.3.0",
|
|
4
4
|
"description": "Mobile SDK for SparkVault Identity, vault, folder, and ingot workflows",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
],
|
|
49
49
|
"author": "SparkVault",
|
|
50
50
|
"license": "PROPRIETARY",
|
|
51
|
-
"homepage": "https://
|
|
51
|
+
"homepage": "https://sparkvault.com/api/docs/sdk-mobile/",
|
|
52
52
|
"repository": {
|
|
53
53
|
"type": "git",
|
|
54
54
|
"url": "git+https://github.com/Spark-Vault/platform.git",
|
package/src/types.ts
CHANGED
|
@@ -419,6 +419,11 @@ export interface PasskeyRegisterChallenge {
|
|
|
419
419
|
session: PasskeySession;
|
|
420
420
|
}
|
|
421
421
|
|
|
422
|
+
/**
|
|
423
|
+
* JSON-encoded WebAuthn credential returned by a native passkey provider,
|
|
424
|
+
* shared by authentication assertions (`authenticatorData`/`signature`) and
|
|
425
|
+
* registration attestations (`attestationObject`).
|
|
426
|
+
*/
|
|
422
427
|
export interface PasskeyCredential {
|
|
423
428
|
id: string;
|
|
424
429
|
rawId: string;
|
|
@@ -427,6 +432,15 @@ export interface PasskeyCredential {
|
|
|
427
432
|
authenticatorData?: string;
|
|
428
433
|
signature?: string;
|
|
429
434
|
attestationObject?: string;
|
|
435
|
+
/**
|
|
436
|
+
* Base64url user handle from an authentication assertion. Optional only
|
|
437
|
+
* because this shape also carries registration attestations, which have
|
|
438
|
+
* no user handle (matching the native lib's `userHandle?: string`).
|
|
439
|
+
* Verification requires it: the Identity server resolves the SVID solely
|
|
440
|
+
* from this value (`allowCredentials` is just an authenticator hint), so
|
|
441
|
+
* providers must pass it through verbatim on authenticate.
|
|
442
|
+
*/
|
|
443
|
+
userHandle?: string;
|
|
430
444
|
};
|
|
431
445
|
type: 'public-key';
|
|
432
446
|
}
|