@adminforth/two-factors-auth 2.10.4 → 2.10.6

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/dist/index.js CHANGED
@@ -21,6 +21,9 @@ export default class TwoFactorsAuthPlugin extends AdminForthPlugin {
21
21
  instanceUniqueRepresentation(pluginOptions) {
22
22
  return `single`;
23
23
  }
24
+ shouldHaveSingleInstancePerWholeApp() {
25
+ return true;
26
+ }
24
27
  checkIfSkipSetupAllowSkipVerify(adminUser) {
25
28
  return __awaiter(this, void 0, void 0, function* () {
26
29
  if (this.options.usersFilterToAllowSkipSetup) {
@@ -175,6 +178,7 @@ export default class TwoFactorsAuthPlugin extends AdminForthPlugin {
175
178
  }
176
179
  return { error: "Invalid passkey" };
177
180
  }
181
+ return { error: "Unsupported confirmation mode" };
178
182
  });
179
183
  }
180
184
  parsePeriod(period) {
package/index.ts CHANGED
@@ -28,6 +28,10 @@ export default class TwoFactorsAuthPlugin extends AdminForthPlugin {
28
28
  return `single`;
29
29
  }
30
30
 
31
+ shouldHaveSingleInstancePerWholeApp(): boolean {
32
+ return true;
33
+ }
34
+
31
35
  public async checkIfSkipSetupAllowSkipVerify(adminUser: AdminUser): Promise<{ skipAllowed: boolean }> {
32
36
  if (this.options.usersFilterToAllowSkipSetup) {
33
37
  const res = await this.options.usersFilterToAllowSkipSetup(adminUser); // recieve result of usersFilterToAllowSkipSetup
@@ -186,6 +190,7 @@ export default class TwoFactorsAuthPlugin extends AdminForthPlugin {
186
190
  }
187
191
  return { error: "Invalid passkey" }
188
192
  }
193
+ return { error: "Unsupported confirmation mode" };
189
194
  }
190
195
 
191
196
  public parsePeriod(period?: string): number {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adminforth/two-factors-auth",
3
- "version": "2.10.4",
3
+ "version": "2.10.6",
4
4
  "description": "AdminForth plugin for two factors authentication",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",