@adminforth/two-factors-auth 2.0.5 → 2.1.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/build.log
CHANGED
|
@@ -13,5 +13,5 @@ custom/package.json
|
|
|
13
13
|
custom/tsconfig.json
|
|
14
14
|
custom/utils.js
|
|
15
15
|
|
|
16
|
-
sent 69,
|
|
17
|
-
total size is 69,
|
|
16
|
+
sent 69,802 bytes received 172 bytes 139,948.00 bytes/sec
|
|
17
|
+
total size is 69,162 speedup is 0.99
|
package/custom/TwoFAModal.vue
CHANGED
|
@@ -24,11 +24,11 @@
|
|
|
24
24
|
|
|
25
25
|
<div class="mt-6 flex justify-center items-center gap-32 w-full">
|
|
26
26
|
<p v-if="doesUserHavePasskeys===true" class="underline hover:no-underline text-lightPrimary whitespace-nowrap hover:cursor-pointer" @click="modalMode = 'passkey'" >use passkey</p>
|
|
27
|
-
<
|
|
28
|
-
class="px-4 py-2 rounded border
|
|
27
|
+
<Button
|
|
28
|
+
class="px-4 py-2 rounded border"
|
|
29
29
|
@click="onCancel"
|
|
30
30
|
:disabled="inProgress"
|
|
31
|
-
>{{ $t('Cancel') }}</
|
|
31
|
+
>{{ $t('Cancel') }}</Button>
|
|
32
32
|
</div>
|
|
33
33
|
</div>
|
|
34
34
|
|
|
@@ -298,15 +298,18 @@
|
|
|
298
298
|
}
|
|
299
299
|
|
|
300
300
|
async function authenticate(options) {
|
|
301
|
+
console.log("Authenticating with options:", options);
|
|
301
302
|
try {
|
|
302
303
|
const abortController = new AbortController();
|
|
303
304
|
const credential = await navigator.credentials.get({
|
|
304
305
|
publicKey: options,
|
|
305
306
|
signal: abortController.signal,
|
|
306
307
|
});
|
|
308
|
+
console.log("Credential obtained:", credential);
|
|
307
309
|
return credential;
|
|
308
310
|
} catch (error) {
|
|
309
|
-
|
|
311
|
+
console.error('Error during authentication:', error);
|
|
312
|
+
adminforth.alert({message: `Error during authentication: ${error}`, variant: 'warning'});
|
|
310
313
|
codeError.value = 'Error during authentication.';
|
|
311
314
|
}
|
|
312
315
|
}
|
|
@@ -24,11 +24,11 @@
|
|
|
24
24
|
|
|
25
25
|
<div class="mt-6 flex justify-center items-center gap-32 w-full">
|
|
26
26
|
<p v-if="doesUserHavePasskeys===true" class="underline hover:no-underline text-lightPrimary whitespace-nowrap hover:cursor-pointer" @click="modalMode = 'passkey'" >use passkey</p>
|
|
27
|
-
<
|
|
28
|
-
class="px-4 py-2 rounded border
|
|
27
|
+
<Button
|
|
28
|
+
class="px-4 py-2 rounded border"
|
|
29
29
|
@click="onCancel"
|
|
30
30
|
:disabled="inProgress"
|
|
31
|
-
>{{ $t('Cancel') }}</
|
|
31
|
+
>{{ $t('Cancel') }}</Button>
|
|
32
32
|
</div>
|
|
33
33
|
</div>
|
|
34
34
|
|
|
@@ -298,15 +298,18 @@
|
|
|
298
298
|
}
|
|
299
299
|
|
|
300
300
|
async function authenticate(options) {
|
|
301
|
+
console.log("Authenticating with options:", options);
|
|
301
302
|
try {
|
|
302
303
|
const abortController = new AbortController();
|
|
303
304
|
const credential = await navigator.credentials.get({
|
|
304
305
|
publicKey: options,
|
|
305
306
|
signal: abortController.signal,
|
|
306
307
|
});
|
|
308
|
+
console.log("Credential obtained:", credential);
|
|
307
309
|
return credential;
|
|
308
310
|
} catch (error) {
|
|
309
|
-
|
|
311
|
+
console.error('Error during authentication:', error);
|
|
312
|
+
adminforth.alert({message: `Error during authentication: ${error}`, variant: 'warning'});
|
|
310
313
|
codeError.value = 'Error during authentication.';
|
|
311
314
|
}
|
|
312
315
|
}
|