@volr/react 0.1.63 → 0.1.65
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/dist/index.cjs +6 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6 -9
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -18877,6 +18877,7 @@ async function enrollPasskey(params) {
|
|
|
18877
18877
|
apiKey,
|
|
18878
18878
|
userId,
|
|
18879
18879
|
userEmail,
|
|
18880
|
+
userEvmAddress,
|
|
18880
18881
|
projectId,
|
|
18881
18882
|
rpId = typeof window !== "undefined" ? window.location.hostname : "localhost",
|
|
18882
18883
|
rpName = "Volr"
|
|
@@ -18884,9 +18885,6 @@ async function enrollPasskey(params) {
|
|
|
18884
18885
|
if (!userId) {
|
|
18885
18886
|
throw new Error("userId is required");
|
|
18886
18887
|
}
|
|
18887
|
-
if (!userEmail) {
|
|
18888
|
-
throw new Error("userEmail is required");
|
|
18889
|
-
}
|
|
18890
18888
|
if (!projectId) {
|
|
18891
18889
|
throw new Error("projectId is required");
|
|
18892
18890
|
}
|
|
@@ -18910,6 +18908,7 @@ async function enrollPasskey(params) {
|
|
|
18910
18908
|
credentialId: tempCredentialId
|
|
18911
18909
|
};
|
|
18912
18910
|
const prfSalt = deriveWrapKey(tempPrfInput);
|
|
18911
|
+
const displayName = userEmail || userEvmAddress || userId;
|
|
18913
18912
|
const publicKeyCredentialCreationOptions = {
|
|
18914
18913
|
challenge: challenge2,
|
|
18915
18914
|
rp: {
|
|
@@ -18918,8 +18917,8 @@ async function enrollPasskey(params) {
|
|
|
18918
18917
|
},
|
|
18919
18918
|
user: {
|
|
18920
18919
|
id: userHandle,
|
|
18921
|
-
name:
|
|
18922
|
-
displayName
|
|
18920
|
+
name: displayName,
|
|
18921
|
+
displayName
|
|
18923
18922
|
},
|
|
18924
18923
|
pubKeyCredParams: PUBKEY_CRED_PARAMS,
|
|
18925
18924
|
authenticatorSelection: AUTHENTICATOR_SELECTION,
|
|
@@ -19035,9 +19034,6 @@ function usePasskeyEnrollment() {
|
|
|
19035
19034
|
if (!user?.id) {
|
|
19036
19035
|
throw new Error("User ID is required for passkey enrollment");
|
|
19037
19036
|
}
|
|
19038
|
-
if (!user?.email) {
|
|
19039
|
-
throw new Error("User email is required for passkey enrollment");
|
|
19040
|
-
}
|
|
19041
19037
|
const accessToken = client.getAccessToken();
|
|
19042
19038
|
if (!accessToken) {
|
|
19043
19039
|
throw new Error(
|
|
@@ -19051,7 +19047,8 @@ function usePasskeyEnrollment() {
|
|
|
19051
19047
|
baseUrl: apiBaseUrl,
|
|
19052
19048
|
apiKey: config.projectApiKey,
|
|
19053
19049
|
userId: user.id,
|
|
19054
|
-
userEmail: user.email,
|
|
19050
|
+
userEmail: user.email ?? null,
|
|
19051
|
+
userEvmAddress: user.evmAddress ?? null,
|
|
19055
19052
|
projectId
|
|
19056
19053
|
});
|
|
19057
19054
|
setStep("registering");
|