@getpara/react-native-wallet 2.14.0 → 2.15.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.
|
@@ -23,11 +23,11 @@ export declare class ParaMobile extends ParaCore {
|
|
|
23
23
|
isPasskeySupported(): Promise<boolean>;
|
|
24
24
|
/**
|
|
25
25
|
* Registers a passkey for the user.
|
|
26
|
-
* @param
|
|
27
|
-
* @param {string} biometricsId - The biometrics ID obtained from verification.
|
|
26
|
+
* @param authState - Either an AuthStateSignup object or a passkeyId string.
|
|
28
27
|
* @returns {Promise<void>}
|
|
29
28
|
*/
|
|
30
29
|
registerPasskey(authState: AuthStateSignup): Promise<void>;
|
|
30
|
+
registerPasskey(passkeyId: string): Promise<void>;
|
|
31
31
|
/**
|
|
32
32
|
* Logs in the user using their authentication credentials.
|
|
33
33
|
* @param {AuthParams} params - The authentication parameters.
|
|
@@ -112,15 +112,10 @@ export class ParaMobile extends ParaCore {
|
|
|
112
112
|
return Passkey.isSupported();
|
|
113
113
|
});
|
|
114
114
|
}
|
|
115
|
-
|
|
116
|
-
* Registers a passkey for the user.
|
|
117
|
-
* @param {Auth<'email'> | Auth<'phone'>} auth - The user's authentication details
|
|
118
|
-
* @param {string} biometricsId - The biometrics ID obtained from verification.
|
|
119
|
-
* @returns {Promise<void>}
|
|
120
|
-
*/
|
|
121
|
-
registerPasskey(authState) {
|
|
115
|
+
registerPasskey(authStateOrPasskeyId) {
|
|
122
116
|
return __awaiter(this, void 0, void 0, function* () {
|
|
123
|
-
|
|
117
|
+
const passkeyId = typeof authStateOrPasskeyId === 'string' ? authStateOrPasskeyId : authStateOrPasskeyId.passkeyId;
|
|
118
|
+
if (!passkeyId) {
|
|
124
119
|
throw new Error('Passkey ID not found. Make sure you have enabled passkey logins in the Para Developer Portal.');
|
|
125
120
|
}
|
|
126
121
|
const userId = this.assertUserId();
|
|
@@ -175,7 +170,7 @@ export class ParaMobile extends ParaCore {
|
|
|
175
170
|
const encryptionKeyHash = getSHA256HashHex(userHandleEncoded);
|
|
176
171
|
const encryptedPrivateKeyHex = yield encryptPrivateKey(keyPair, userHandleEncoded);
|
|
177
172
|
const { partnerId } = yield this.ctx.client.touchSession();
|
|
178
|
-
yield this.ctx.client.patchSessionPublicKey(partnerId, userId,
|
|
173
|
+
yield this.ctx.client.patchSessionPublicKey(partnerId, userId, passkeyId, {
|
|
179
174
|
publicKey: resultJson.id,
|
|
180
175
|
sigDerivedPublicKey: publicKeyHex,
|
|
181
176
|
cosePublicKey,
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getpara/react-native-wallet",
|
|
3
3
|
"description": "Para Wallet for React Native",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.15.0",
|
|
5
5
|
"author": "Para Team <hello@getpara.com> (https://getpara.com)",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@getpara/core-sdk": "2.
|
|
8
|
-
"@getpara/user-management-client": "2.
|
|
9
|
-
"@getpara/web-sdk": "2.
|
|
7
|
+
"@getpara/core-sdk": "2.15.0",
|
|
8
|
+
"@getpara/user-management-client": "2.15.0",
|
|
9
|
+
"@getpara/web-sdk": "2.15.0",
|
|
10
10
|
"@peculiar/webcrypto": "^1.5.0",
|
|
11
11
|
"@ungap/structured-clone": "1.3.0",
|
|
12
12
|
"react-native-url-polyfill": "2.0.0",
|
|
@@ -92,5 +92,5 @@
|
|
|
92
92
|
]
|
|
93
93
|
}
|
|
94
94
|
},
|
|
95
|
-
"gitHead": "
|
|
95
|
+
"gitHead": "9cecc178e975a44d8ed4b03f46aeb57ddcb7a152"
|
|
96
96
|
}
|