@aooth/auth-moost 0.1.76 → 0.1.78

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.d.mts CHANGED
@@ -181,7 +181,7 @@ declare function authGuardInterceptor(opts?: AuthOptions): TInterceptorDef;
181
181
  */
182
182
  declare function AuthGuarded(opts?: AuthOptions): ClassDecorator & MethodDecorator;
183
183
  //#endregion
184
- //#region ../../node_modules/.pnpm/@wooksjs+event-wf@0.7.26_@prostojs+logger@0.4.3_@wooksjs+event-core@0.7.26_@wooksjs+eve_0fc020e356984ae1bc846cc95ef0c31b/node_modules/@wooksjs/event-wf/dist/index.d.ts
184
+ //#region ../../node_modules/.pnpm/@wooksjs+event-wf@0.7.27_@prostojs+logger@0.4.3_@wooksjs+event-core@0.7.27_@wooksjs+eve_b6a682efa6cbf72f90b2c5adbc949044/node_modules/@wooksjs/event-wf/dist/index.d.ts
185
185
  interface WfFinishedResponse {
186
186
  type: 'redirect' | 'data';
187
187
  /** Redirect URL or response body */
package/dist/index.mjs CHANGED
@@ -2736,7 +2736,7 @@ let AuthWorkflow = _AuthWorkflow = class AuthWorkflow {
2736
2736
  ctx.isFirstLogin = false;
2737
2737
  return;
2738
2738
  }
2739
- return this.users.getUser(ctx.subject).then((user) => {
2739
+ return this.users.getUserSnapshot(ctx.subject, current()).then((user) => {
2740
2740
  ctx.isFirstLogin = !user?.account?.lastLogin;
2741
2741
  }, (err) => {
2742
2742
  if (err instanceof UserAuthError && err.type === "NOT_FOUND") {
@@ -2840,7 +2840,7 @@ let AuthWorkflow = _AuthWorkflow = class AuthWorkflow {
2840
2840
  autoPickEnroll();
2841
2841
  return;
2842
2842
  }
2843
- return this.users.getUser(ctx.subject).then((user) => {
2843
+ return this.users.getUserSnapshot(ctx.subject, current()).then((user) => {
2844
2844
  const allowed = new Set(transports);
2845
2845
  const confirmed = (user?.mfa?.methods ?? []).filter((m) => m.confirmed && allowed.has(m.name));
2846
2846
  if (confirmed.length > 0 && user?.mfa?.defaultMethod) {
@@ -3665,7 +3665,7 @@ let AuthWorkflow = _AuthWorkflow = class AuthWorkflow {
3665
3665
  */
3666
3666
  async loadEnrolledMfaMethods(ctx) {
3667
3667
  if (!ctx.subject) return void 0;
3668
- const user = await this.users.getUser(ctx.subject);
3668
+ const user = await this.users.getUserSnapshot(ctx.subject, current());
3669
3669
  const mfa = ctx.mfa ??= {};
3670
3670
  const allowed = new Set(ctx.mfaPolicy?.availableTransports ?? []);
3671
3671
  const summary = this.users.getAvailableMfaMethods(user.mfa).filter((m) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aooth/auth-moost",
3
- "version": "0.1.76",
3
+ "version": "0.1.78",
4
4
  "description": "Moost auth integration for aoothjs — AuthGuard interceptor, useAuth composable, REST endpoints, workflows",
5
5
  "keywords": [
6
6
  "aoothjs",
@@ -57,33 +57,33 @@
57
57
  "access": "public"
58
58
  },
59
59
  "dependencies": {
60
- "@atscript/moost-wf": "^0.1.149",
61
- "@wooksjs/http-body": "^0.7.26",
62
- "@aooth/arbac-moost": "^0.1.76",
63
- "@aooth/auth": "0.1.76",
64
- "@aooth/idp": "0.1.76",
65
- "@aooth/user": "0.1.76"
60
+ "@atscript/moost-wf": "^0.1.152",
61
+ "@wooksjs/http-body": "^0.7.27",
62
+ "@aooth/arbac-moost": "^0.1.78",
63
+ "@aooth/auth": "0.1.78",
64
+ "@aooth/user": "0.1.78",
65
+ "@aooth/idp": "0.1.78"
66
66
  },
67
67
  "devDependencies": {
68
- "@atscript/core": "^0.1.100",
69
- "@atscript/typescript": "^0.1.100",
70
- "@atscript/ui": "^0.1.149",
71
- "@atscript/ui-fns": "^0.1.149",
72
- "@moostjs/event-http": "^0.6.45",
73
- "@moostjs/event-wf": "^0.6.45",
74
- "moost": "^0.6.45",
75
- "unplugin-atscript": "^0.1.100",
76
- "wooks": "^0.7.26"
68
+ "@atscript/core": "^0.1.102",
69
+ "@atscript/typescript": "^0.1.102",
70
+ "@atscript/ui": "^0.1.152",
71
+ "@atscript/ui-fns": "^0.1.152",
72
+ "@moostjs/event-http": "^0.6.48",
73
+ "@moostjs/event-wf": "^0.6.48",
74
+ "moost": "^0.6.48",
75
+ "unplugin-atscript": "^0.1.102",
76
+ "wooks": "^0.7.27"
77
77
  },
78
78
  "peerDependencies": {
79
- "@atscript/moost-wf": "^0.1.149",
80
- "@atscript/typescript": "^0.1.100",
81
- "@moostjs/event-http": "^0.6.45",
82
- "@moostjs/event-wf": "^0.6.45",
83
- "@wooksjs/event-core": "^0.7.26",
84
- "@wooksjs/event-http": "^0.7.26",
85
- "@wooksjs/http-body": "^0.7.26",
86
- "moost": "^0.6.45"
79
+ "@atscript/moost-wf": "^0.1.152",
80
+ "@atscript/typescript": "^0.1.102",
81
+ "@moostjs/event-http": "^0.6.48",
82
+ "@moostjs/event-wf": "^0.6.48",
83
+ "@wooksjs/event-core": "^0.7.27",
84
+ "@wooksjs/event-http": "^0.7.27",
85
+ "@wooksjs/http-body": "^0.7.27",
86
+ "moost": "^0.6.48"
87
87
  },
88
88
  "peerDependenciesMeta": {
89
89
  "@atscript/typescript": {