@social-mail/social-mail-web-server 1.4.837 → 1.4.839

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@social-mail/social-mail-web-server",
3
- "version": "1.4.837",
3
+ "version": "1.4.839",
4
4
  "description": "## Phase 1",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -96,22 +96,23 @@ export default class UserAuthFactorEvents extends AuthenticatedEvents<UserAuthFa
96
96
  return;
97
97
  }
98
98
  }
99
+
100
+ if (entity.verificationID) {
101
+
102
+ const eois = ServiceProvider.resolve(this, ExternalOtpInService);
103
+ const result = await eois.get(entity.verificationID);
104
+ if (result.success) {
105
+ entity.verified = true;
106
+ }
107
+
108
+ return;
109
+ }
110
+
99
111
  if (entity.method !== "totp") {
100
112
  throw new EntityAccessError(`Cannot modify Auth Factor.`);
101
113
  }
102
114
  if (!entity.verified) {
103
115
 
104
- if (entity.verificationID) {
105
-
106
- const eois = ServiceProvider.resolve(this, ExternalOtpInService);
107
- const result = await eois.get(entity.verificationID);
108
- if (result.success) {
109
- entity.verified = true;
110
- }
111
-
112
- return;
113
- }
114
-
115
116
  await this.multiAuthFactorService.verify({ id: 0, token: entity.token, secret: entity.secret});
116
117
  entity.verified = true;
117
118
  }
@@ -17,4 +17,8 @@ export default class VerificationTokenEvents extends AuthenticatedEvents<Verific
17
17
  onForeignKeyFilter(filter: ForeignKeyFilter<VerificationToken, any>) {
18
18
  return filter.unfiltered();
19
19
  }
20
+
21
+ includeFilter(query: IEntityQuery<VerificationToken>, type?: any, key?: string): IEntityQuery<VerificationToken> {
22
+ return query;
23
+ }
20
24
  }