@swype-org/react-sdk 0.1.152 → 0.1.154
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 +8 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +8 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -6118,14 +6118,19 @@ function usePasskeyHandlers(dispatch, apiBaseUrl, accounts, knownCredentialIds,
|
|
|
6118
6118
|
try {
|
|
6119
6119
|
const token = await getAccessToken();
|
|
6120
6120
|
if (knownCredentialIds.length > 0) {
|
|
6121
|
-
const
|
|
6121
|
+
const directMatch = await findDevicePasskey(knownCredentialIds).catch(() => null);
|
|
6122
|
+
if (directMatch) {
|
|
6123
|
+
await activateExistingCredential(directMatch);
|
|
6124
|
+
return;
|
|
6125
|
+
}
|
|
6126
|
+
const popupMatch = await findDevicePasskeyViaPopup({
|
|
6122
6127
|
credentialIds: knownCredentialIds,
|
|
6123
6128
|
rpId: resolvePasskeyRpId(),
|
|
6124
6129
|
authToken: token ?? void 0,
|
|
6125
6130
|
apiBaseUrl
|
|
6126
6131
|
});
|
|
6127
|
-
if (
|
|
6128
|
-
await activateExistingCredential(
|
|
6132
|
+
if (popupMatch) {
|
|
6133
|
+
await activateExistingCredential(popupMatch);
|
|
6129
6134
|
return;
|
|
6130
6135
|
}
|
|
6131
6136
|
}
|