@adminforth/two-factors-auth 1.11.0 → 1.11.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 CHANGED
@@ -13,5 +13,5 @@ custom/package.json
13
13
  custom/tsconfig.json
14
14
  custom/utils.js
15
15
 
16
- sent 68,334 bytes received 172 bytes 137,012.00 bytes/sec
17
- total size is 67,703 speedup is 0.99
16
+ sent 68,512 bytes received 172 bytes 137,368.00 bytes/sec
17
+ total size is 67,872 speedup is 0.99
@@ -176,10 +176,12 @@
176
176
  import utc from 'dayjs/plugin/utc';
177
177
  import timezone from 'dayjs/plugin/timezone';
178
178
  import { useCoreStore } from '@/stores/core';
179
+ import { useUserStore } from '@/stores/user'
179
180
 
180
181
  dayjs.extend(utc);
181
182
  dayjs.extend(timezone);
182
183
  const coreStore = useCoreStore();
184
+ const userStore = useUserStore();
183
185
  const passkeys = ref([]);
184
186
  const isPasskeySupported = ref(false);
185
187
  const passkeysNewName = ref('');
@@ -202,12 +204,14 @@
202
204
  const fetchedOptions = ref(null);
203
205
 
204
206
  onMounted(async () => {
205
- await getPasskeys();
206
- await checkForCompatibility();
207
- if (authenticatorAttachment.value === "cross-platform") {
208
- addPasskeyMode.value = 'cross-platform';
209
- }
210
- isInitialFinished.value = true;
207
+ if (userStore.isAuthorized === true ) {
208
+ await getPasskeys();
209
+ await checkForCompatibility();
210
+ if (authenticatorAttachment.value === "cross-platform") {
211
+ addPasskeyMode.value = 'cross-platform';
212
+ }
213
+ isInitialFinished.value = true;
214
+ }
211
215
  });
212
216
 
213
217
  onMounted(() => {
@@ -176,10 +176,12 @@
176
176
  import utc from 'dayjs/plugin/utc';
177
177
  import timezone from 'dayjs/plugin/timezone';
178
178
  import { useCoreStore } from '@/stores/core';
179
+ import { useUserStore } from '@/stores/user'
179
180
 
180
181
  dayjs.extend(utc);
181
182
  dayjs.extend(timezone);
182
183
  const coreStore = useCoreStore();
184
+ const userStore = useUserStore();
183
185
  const passkeys = ref([]);
184
186
  const isPasskeySupported = ref(false);
185
187
  const passkeysNewName = ref('');
@@ -202,12 +204,14 @@
202
204
  const fetchedOptions = ref(null);
203
205
 
204
206
  onMounted(async () => {
205
- await getPasskeys();
206
- await checkForCompatibility();
207
- if (authenticatorAttachment.value === "cross-platform") {
208
- addPasskeyMode.value = 'cross-platform';
209
- }
210
- isInitialFinished.value = true;
207
+ if (userStore.isAuthorized === true ) {
208
+ await getPasskeys();
209
+ await checkForCompatibility();
210
+ if (authenticatorAttachment.value === "cross-platform") {
211
+ addPasskeyMode.value = 'cross-platform';
212
+ }
213
+ isInitialFinished.value = true;
214
+ }
211
215
  });
212
216
 
213
217
  onMounted(() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adminforth/two-factors-auth",
3
- "version": "1.11.0",
3
+ "version": "1.11.1",
4
4
  "description": "AdminForth plugin for two factors authentication",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",