@adminforth/two-factors-auth 4.1.1 → 4.1.3

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
@@ -17,5 +17,5 @@ custom/tsconfig.json
17
17
  custom/use2faApi.ts
18
18
  custom/utils.js
19
19
 
20
- sent 288,076 bytes received 248 bytes 576,648.00 bytes/sec
21
- total size is 287,093 speedup is 1.00
20
+ sent 288,092 bytes received 248 bytes 576,680.00 bytes/sec
21
+ total size is 287,109 speedup is 1.00
@@ -234,7 +234,7 @@
234
234
  }
235
235
  const skipAllowModal = await checkIfSkipAllowModal();
236
236
  if (skipAllowModal) {
237
- resolve({ mode: 'totp', result: '123456' });
237
+ resolve({});
238
238
  return;
239
239
  }
240
240
  await checkIfUserHasPasskeys();
@@ -220,7 +220,7 @@
220
220
  }
221
221
  }
222
222
 
223
- type ConfirmationResult = { mode: 'totp'; result: string } | { mode: 'passkey'; result: Record<string, any> };
223
+ type ConfirmationResult = { mode: 'totp'; result: string } | { mode: 'passkey'; result: Record<string, any> } | { mode?: undefined };
224
224
 
225
225
  async function requestPasskeyChallenge(confirmationResult: ConfirmationResult) {
226
226
  try {
@@ -3,7 +3,8 @@ import { defineStore } from 'pinia';
3
3
 
4
4
  export type TwoFaConfirmationResult =
5
5
  | { mode: 'totp'; result: string }
6
- | { mode: 'passkey'; result: Record<string, any> };
6
+ | { mode: 'passkey'; result: Record<string, any> }
7
+ | { mode?: undefined };
7
8
 
8
9
  type VerifyFn = (confirmationResult: string) => Promise<boolean> | boolean;
9
10
  type Get2FaConfirmationResultHandler = (
@@ -234,7 +234,7 @@
234
234
  }
235
235
  const skipAllowModal = await checkIfSkipAllowModal();
236
236
  if (skipAllowModal) {
237
- resolve({ mode: 'totp', result: '123456' });
237
+ resolve({});
238
238
  return;
239
239
  }
240
240
  await checkIfUserHasPasskeys();
@@ -220,7 +220,7 @@
220
220
  }
221
221
  }
222
222
 
223
- type ConfirmationResult = { mode: 'totp'; result: string } | { mode: 'passkey'; result: Record<string, any> };
223
+ type ConfirmationResult = { mode: 'totp'; result: string } | { mode: 'passkey'; result: Record<string, any> } | { mode?: undefined };
224
224
 
225
225
  async function requestPasskeyChallenge(confirmationResult: ConfirmationResult) {
226
226
  try {
@@ -3,7 +3,8 @@ import { defineStore } from 'pinia';
3
3
 
4
4
  export type TwoFaConfirmationResult =
5
5
  | { mode: 'totp'; result: string }
6
- | { mode: 'passkey'; result: Record<string, any> };
6
+ | { mode: 'passkey'; result: Record<string, any> }
7
+ | { mode?: undefined };
7
8
 
8
9
  type VerifyFn = (confirmationResult: string) => Promise<boolean> | boolean;
9
10
  type Get2FaConfirmationResultHandler = (
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adminforth/two-factors-auth",
3
- "version": "4.1.1",
3
+ "version": "4.1.3",
4
4
  "description": "AdminForth plugin for two factors authentication",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -28,11 +28,11 @@
28
28
  "node-2fa": "^2.0.3"
29
29
  },
30
30
  "peerDependencies": {
31
- "adminforth": "3.1.0"
31
+ "adminforth": "3.1.2"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@types/node": "^22.10.7",
35
- "adminforth": "3.0.1",
35
+ "adminforth": "3.1.2",
36
36
  "semantic-release": "^24.2.1",
37
37
  "semantic-release-slack-bot": "^4.0.2",
38
38
  "typescript": "^5.7.3"