@adminforth/two-factors-auth 2.0.0 → 2.0.1
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/build.log +2 -2
- package/custom/TwoFactorsConfirmation.vue +19 -15
- package/dist/custom/TwoFactorsConfirmation.vue +19 -15
- package/package.json +1 -1
package/build.log
CHANGED
|
@@ -13,5 +13,5 @@ custom/package.json
|
|
|
13
13
|
custom/tsconfig.json
|
|
14
14
|
custom/utils.js
|
|
15
15
|
|
|
16
|
-
sent 68,
|
|
17
|
-
total size is 67,
|
|
16
|
+
sent 68,570 bytes received 172 bytes 137,484.00 bytes/sec
|
|
17
|
+
total size is 67,930 speedup is 0.99
|
|
@@ -143,7 +143,7 @@
|
|
|
143
143
|
await isCMAAvailable();
|
|
144
144
|
tagOtpInputs();
|
|
145
145
|
if (isPasskeysSupported.value === true) {
|
|
146
|
-
checkIfUserHasPasskeys();
|
|
146
|
+
await checkIfUserHasPasskeys();
|
|
147
147
|
}
|
|
148
148
|
document.addEventListener('focusin', handleGlobalFocusIn, true);
|
|
149
149
|
focusFirstAvailableOtpInput();
|
|
@@ -219,21 +219,25 @@
|
|
|
219
219
|
}
|
|
220
220
|
}
|
|
221
221
|
|
|
222
|
-
function checkIfUserHasPasskeys() {
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
222
|
+
async function checkIfUserHasPasskeys() {
|
|
223
|
+
try {
|
|
224
|
+
await callAdminForthApi({
|
|
225
|
+
method: 'POST',
|
|
226
|
+
path: '/plugin/passkeys/checkIfUserHasPasskeys',
|
|
227
|
+
}).then(async (response) => {
|
|
228
|
+
if (response.ok) {
|
|
229
|
+
doesUserHavePasskeys.value = response.hasPasskeys;
|
|
230
|
+
if ( doesUserHavePasskeys.value === true ) {
|
|
231
|
+
router.push({ hash: '#passkey' })
|
|
232
|
+
confirmationMode.value = 'passkey';
|
|
233
|
+
} else {
|
|
234
|
+
router.push({ hash: '#code' })
|
|
235
|
+
}
|
|
234
236
|
}
|
|
235
|
-
}
|
|
236
|
-
})
|
|
237
|
+
});
|
|
238
|
+
} catch (error) {
|
|
239
|
+
console.error('Error checking if user has passkeys:', error);
|
|
240
|
+
}
|
|
237
241
|
}
|
|
238
242
|
|
|
239
243
|
async function usePasskeyButton() {
|
|
@@ -143,7 +143,7 @@
|
|
|
143
143
|
await isCMAAvailable();
|
|
144
144
|
tagOtpInputs();
|
|
145
145
|
if (isPasskeysSupported.value === true) {
|
|
146
|
-
checkIfUserHasPasskeys();
|
|
146
|
+
await checkIfUserHasPasskeys();
|
|
147
147
|
}
|
|
148
148
|
document.addEventListener('focusin', handleGlobalFocusIn, true);
|
|
149
149
|
focusFirstAvailableOtpInput();
|
|
@@ -219,21 +219,25 @@
|
|
|
219
219
|
}
|
|
220
220
|
}
|
|
221
221
|
|
|
222
|
-
function checkIfUserHasPasskeys() {
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
222
|
+
async function checkIfUserHasPasskeys() {
|
|
223
|
+
try {
|
|
224
|
+
await callAdminForthApi({
|
|
225
|
+
method: 'POST',
|
|
226
|
+
path: '/plugin/passkeys/checkIfUserHasPasskeys',
|
|
227
|
+
}).then(async (response) => {
|
|
228
|
+
if (response.ok) {
|
|
229
|
+
doesUserHavePasskeys.value = response.hasPasskeys;
|
|
230
|
+
if ( doesUserHavePasskeys.value === true ) {
|
|
231
|
+
router.push({ hash: '#passkey' })
|
|
232
|
+
confirmationMode.value = 'passkey';
|
|
233
|
+
} else {
|
|
234
|
+
router.push({ hash: '#code' })
|
|
235
|
+
}
|
|
234
236
|
}
|
|
235
|
-
}
|
|
236
|
-
})
|
|
237
|
+
});
|
|
238
|
+
} catch (error) {
|
|
239
|
+
console.error('Error checking if user has passkeys:', error);
|
|
240
|
+
}
|
|
237
241
|
}
|
|
238
242
|
|
|
239
243
|
async function usePasskeyButton() {
|