@adminforth/two-factors-auth 2.9.12 → 2.9.13

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
@@ -15,5 +15,5 @@ custom/package.json
15
15
  custom/tsconfig.json
16
16
  custom/utils.js
17
17
 
18
- sent 273,524 bytes received 210 bytes 547,468.00 bytes/sec
19
- total size is 272,697 speedup is 1.00
18
+ sent 273,800 bytes received 210 bytes 548,020.00 bytes/sec
19
+ total size is 272,973 speedup is 1.00
@@ -1,11 +1,13 @@
1
1
  <template>
2
2
 
3
3
  <Button
4
- class="w-full !py-1"
4
+ class="w-full !py-2"
5
5
  @click="handleLoginWithPasskey"
6
6
  >
7
- <IconShieldOutline class="w-7 h-8" />
8
- <span class="ml-2">{{ $t('Continue with Passkey') }}</span>
7
+ <div class="flex items-center justify-center">
8
+ <IconShieldOutline class="w-6 h-6 mr-1" />
9
+ <span>{{ $t('Continue with Passkey') }}</span>
10
+ </div>
9
11
  </Button>
10
12
 
11
13
  </template>
@@ -254,6 +254,7 @@ async function sendCode (value) {
254
254
  }
255
255
  })
256
256
  if (resp.allowedLogin) {
257
+ localStorage.setItem('twofa-skip-setup', 'false');
257
258
  if ( route.meta.isPasskeysEnabled ) {
258
259
  handlePasskeyAlert(route.meta.suggestionPeriod, router);
259
260
  }
@@ -276,6 +277,7 @@ function handlePaste(event) {
276
277
  }
277
278
 
278
279
  const handleSkip = async () => {
280
+ localStorage.setItem('twofa-skip-setup', 'true');
279
281
  const resp = await callAdminForthApi({
280
282
  method: 'POST',
281
283
  path: '/plugin/twofa/confirmLogin',
package/custom/utils.js CHANGED
@@ -26,8 +26,8 @@
26
26
  }
27
27
  }
28
28
  suggestPasskey = window.localStorage.getItem('suggestPasskey');
29
-
30
- if ( suggestPasskey === 'true' ) {
29
+ let userSkippedSetup = window.localStorage.getItem('twofa-skip-setup');
30
+ if ( suggestPasskey === 'true' && userSkippedSetup !== 'true') {
31
31
  adminforth.alert({
32
32
  message: 'Do you want to add passkey?',
33
33
  variant: 'info',
@@ -1,11 +1,13 @@
1
1
  <template>
2
2
 
3
3
  <Button
4
- class="w-full !py-1"
4
+ class="w-full !py-2"
5
5
  @click="handleLoginWithPasskey"
6
6
  >
7
- <IconShieldOutline class="w-7 h-8" />
8
- <span class="ml-2">{{ $t('Continue with Passkey') }}</span>
7
+ <div class="flex items-center justify-center">
8
+ <IconShieldOutline class="w-6 h-6 mr-1" />
9
+ <span>{{ $t('Continue with Passkey') }}</span>
10
+ </div>
9
11
  </Button>
10
12
 
11
13
  </template>
@@ -254,6 +254,7 @@ async function sendCode (value) {
254
254
  }
255
255
  })
256
256
  if (resp.allowedLogin) {
257
+ localStorage.setItem('twofa-skip-setup', 'false');
257
258
  if ( route.meta.isPasskeysEnabled ) {
258
259
  handlePasskeyAlert(route.meta.suggestionPeriod, router);
259
260
  }
@@ -276,6 +277,7 @@ function handlePaste(event) {
276
277
  }
277
278
 
278
279
  const handleSkip = async () => {
280
+ localStorage.setItem('twofa-skip-setup', 'true');
279
281
  const resp = await callAdminForthApi({
280
282
  method: 'POST',
281
283
  path: '/plugin/twofa/confirmLogin',
@@ -26,8 +26,8 @@
26
26
  }
27
27
  }
28
28
  suggestPasskey = window.localStorage.getItem('suggestPasskey');
29
-
30
- if ( suggestPasskey === 'true' ) {
29
+ let userSkippedSetup = window.localStorage.getItem('twofa-skip-setup');
30
+ if ( suggestPasskey === 'true' && userSkippedSetup !== 'true') {
31
31
  adminforth.alert({
32
32
  message: 'Do you want to add passkey?',
33
33
  variant: 'info',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adminforth/two-factors-auth",
3
- "version": "2.9.12",
3
+ "version": "2.9.13",
4
4
  "description": "AdminForth plugin for two factors authentication",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",