@aooth/auth-moost 0.2.5 → 0.2.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aooth/auth-moost",
3
- "version": "0.2.5",
3
+ "version": "0.2.6",
4
4
  "description": "Moost auth integration for aoothjs — AuthGuard interceptor, useAuth composable, REST endpoints, workflows",
5
5
  "keywords": [
6
6
  "aoothjs",
@@ -57,33 +57,35 @@
57
57
  "access": "public"
58
58
  },
59
59
  "dependencies": {
60
- "@atscript/moost-wf": "^0.1.167",
60
+ "@atscript/moost-wf": "^0.1.169",
61
61
  "@wooksjs/http-body": "^0.8.1",
62
- "@aooth/arbac-moost": "^0.2.5",
63
- "@aooth/auth": "0.2.5",
64
- "@aooth/idp": "0.2.5",
65
- "@aooth/user": "0.2.5"
62
+ "@aooth/auth": "0.2.6",
63
+ "@aooth/arbac-moost": "^0.2.6",
64
+ "@aooth/user": "0.2.6",
65
+ "@aooth/idp": "0.2.6"
66
66
  },
67
67
  "devDependencies": {
68
- "@atscript/core": "^0.2.8",
69
- "@atscript/typescript": "^0.2.8",
70
- "@atscript/ui": "^0.1.167",
71
- "@atscript/ui-fns": "^0.1.167",
72
- "@moostjs/event-http": "^0.7.3",
73
- "@moostjs/event-wf": "^0.7.3",
74
- "moost": "^0.7.3",
75
- "unplugin-atscript": "^0.2.8",
68
+ "@atscript/core": "^0.2.9",
69
+ "@atscript/db": "^0.1.174",
70
+ "@atscript/moost-db": "^0.1.174",
71
+ "@atscript/typescript": "^0.2.9",
72
+ "@atscript/ui": "^0.1.169",
73
+ "@atscript/ui-fns": "^0.1.169",
74
+ "@moostjs/event-http": "^0.7.4",
75
+ "@moostjs/event-wf": "^0.7.4",
76
+ "moost": "^0.7.4",
77
+ "unplugin-atscript": "^0.2.9",
76
78
  "wooks": "^0.8.1"
77
79
  },
78
80
  "peerDependencies": {
79
- "@atscript/moost-wf": "^0.1.167",
80
- "@atscript/typescript": "^0.2.8",
81
- "@moostjs/event-http": "^0.7.3",
82
- "@moostjs/event-wf": "^0.7.3",
81
+ "@atscript/moost-wf": "^0.1.169",
82
+ "@atscript/typescript": "^0.2.9",
83
+ "@moostjs/event-http": "^0.7.4",
84
+ "@moostjs/event-wf": "^0.7.4",
83
85
  "@wooksjs/event-core": "^0.8.1",
84
86
  "@wooksjs/event-http": "^0.8.1",
85
87
  "@wooksjs/http-body": "^0.8.1",
86
- "moost": "^0.7.3"
88
+ "moost": "^0.7.4"
87
89
  },
88
90
  "peerDependenciesMeta": {
89
91
  "@atscript/typescript": {
@@ -840,9 +840,10 @@ export interface ConcurrencyLimitForm {
840
840
  }
841
841
 
842
842
  /**
843
- * Identifier form for the magic-link login path — same shape as
844
- * {@link EmailIdentifierForm} but kept separate because future iterations may
845
- * accept either email or username.
843
+ * Identifier form of the login flow's `magicLink` alt-action
844
+ * (`forms.magicLinkRequest`): an email or username. The link goes to an inbox
845
+ * the account proved; the answer is the same whether or not an account
846
+ * matches.
846
847
  */
847
848
  @meta.label 'Sign in with a magic link'
848
849
  @meta.description 'Enter your account email or username and we will send you a one-time sign-in link.'
@@ -856,8 +857,25 @@ export interface MagicLinkRequestForm {
856
857
  }
857
858
 
858
859
  /**
859
- * Recovery delivery-mode picker — rendered only when
860
- * `RecoveryWorkflowOptions.deliveryMode === 'choice'`.
860
+ * Landing step of a clicked magic link (`forms.magicLinkConfirm`): "Continue
861
+ * as a•••@example.com". Opening the link only renders this form — the link is
862
+ * used up when it is submitted — so a mail scanner that opens links does not
863
+ * spend it, and the masked account shows which account the link is for.
864
+ */
865
+ @meta.label 'Continue with your link'
866
+ @wf.context.pass 'public'
867
+ @ui.form.submit.text 'Continue'
868
+ export interface MagicLinkConfirmForm {
869
+ @ui.form.order 1
870
+ @ui.form.fn.value '(_, _d, ctx, _e, t) => ctx.public?.magicLink?.account ? t("Continue as {account}.", { account: ctx.public.magicLink.account }) : t("Continue with the link from your email.")'
871
+ notice: ui.paragraph
872
+ }
873
+
874
+ /**
875
+ * Recovery delivery-mode picker (`forms.recoveryModeSelect`) — rendered after
876
+ * the identifier when `resolveRecoveryDeliveryMode()` returns `'choice'`, for
877
+ * known and unknown identifiers alike. `magicLink` sends a single-use link,
878
+ * `otp` a one-time code.
861
879
  */
862
880
  @meta.label 'Choose how to verify'
863
881
  @meta.description 'Pick how you would like to recover access.'
@@ -872,37 +890,6 @@ export interface RecoveryModeSelectForm {
872
890
 
873
891
  }
874
892
 
875
- /**
876
- * Recovery factor-verification form — used when
877
- * `RecoveryWorkflowOptions.requireKnownRecoveryFactor` is true. The user
878
- * picks a factor type and supplies its value; the server validates against
879
- * the enrolled factor (phone last-4 or current TOTP code). Options are
880
- * built from `ctx.public.preReset.availableRecoveryFactors` (workflow whitelist ∩
881
- * user's enrolled factors), so users only see factors they can actually
882
- * verify AND that the admin hasn't disabled via `opts.preReset.allowedFactors`.
883
- * The staged options are shown as given — not passed through `t` — so whoever
884
- * stages them supplies labels already in the request's language.
885
- */
886
- @meta.label 'Verify your identity'
887
- @meta.description 'Confirm a detail we have on file before resetting your password.'
888
- @wf.context.pass 'public'
889
- export interface RecoveryFactorForm {
890
- @ui.form.order 10
891
- @ui.form.type 'radio'
892
- @ui.form.fn.options '(_, _d, ctx) => Array.isArray(ctx.public?.preReset?.availableRecoveryFactors) ? ctx.public.preReset.availableRecoveryFactors : []'
893
- @meta.label 'Factor'
894
- @meta.required
895
- factor: string
896
-
897
- @ui.form.order 20
898
- @ui.form.type 'text'
899
- @meta.label 'Value'
900
- @meta.required
901
- @expect.minLength 4
902
- @expect.maxLength 12
903
- value: string
904
- }
905
-
906
893
  /**
907
894
  * Authenticated "change my password" form — surfaced by the
908
895
  * change-password.flow `change-password-form` step to a SIGNED-IN user.
@@ -403,7 +403,7 @@ export declare class ConcurrencyLimitForm {
403
403
 
404
404
  /**
405
405
  * Atscript interface **MagicLinkRequestForm**
406
- * @see {@link ./forms.as:849:18}
406
+ * @see {@link ./forms.as:850:18}
407
407
  */
408
408
  export declare class MagicLinkRequestForm {
409
409
  identifier: string
@@ -418,15 +418,15 @@ export declare class MagicLinkRequestForm {
418
418
  }
419
419
 
420
420
  /**
421
- * Atscript interface **RecoveryModeSelectForm**
422
- * @see {@link ./forms.as:864:18}
421
+ * Atscript interface **MagicLinkConfirmForm**
422
+ * @see {@link ./forms.as:868:18}
423
423
  */
424
- export declare class RecoveryModeSelectForm {
425
- mode: string
424
+ export declare class MagicLinkConfirmForm {
425
+ // notice: ui.paragraph
426
426
  static __is_atscript_annotated_type: true
427
- static type: TAtscriptTypeObject<keyof RecoveryModeSelectForm, RecoveryModeSelectForm>
427
+ static type: TAtscriptTypeObject<keyof MagicLinkConfirmForm, MagicLinkConfirmForm>
428
428
  static metadata: TMetadataMap<AtscriptMetadata>
429
- static validator: (opts?: Partial<TValidatorOptions>) => Validator<typeof RecoveryModeSelectForm>
429
+ static validator: (opts?: Partial<TValidatorOptions>) => Validator<typeof MagicLinkConfirmForm>
430
430
  /** @deprecated JSON Schema support is disabled. Calling this method will throw a runtime error. To enable, set `jsonSchema: 'lazy'` or `jsonSchema: 'bundle'` in tsPlugin options, or add `@emit.jsonSchema` annotation to individual interfaces. */
431
431
  static toJsonSchema: () => any
432
432
  /** @deprecated Example Data support is disabled. To enable, set `exampleData: true` in tsPlugin options. */
@@ -434,16 +434,15 @@ export declare class RecoveryModeSelectForm {
434
434
  }
435
435
 
436
436
  /**
437
- * Atscript interface **RecoveryFactorForm**
438
- * @see {@link ./forms.as:889:18}
437
+ * Atscript interface **RecoveryModeSelectForm**
438
+ * @see {@link ./forms.as:882:18}
439
439
  */
440
- export declare class RecoveryFactorForm {
441
- factor: string
442
- value: string
440
+ export declare class RecoveryModeSelectForm {
441
+ mode: string
443
442
  static __is_atscript_annotated_type: true
444
- static type: TAtscriptTypeObject<keyof RecoveryFactorForm, RecoveryFactorForm>
443
+ static type: TAtscriptTypeObject<keyof RecoveryModeSelectForm, RecoveryModeSelectForm>
445
444
  static metadata: TMetadataMap<AtscriptMetadata>
446
- static validator: (opts?: Partial<TValidatorOptions>) => Validator<typeof RecoveryFactorForm>
445
+ static validator: (opts?: Partial<TValidatorOptions>) => Validator<typeof RecoveryModeSelectForm>
447
446
  /** @deprecated JSON Schema support is disabled. Calling this method will throw a runtime error. To enable, set `jsonSchema: 'lazy'` or `jsonSchema: 'bundle'` in tsPlugin options, or add `@emit.jsonSchema` annotation to individual interfaces. */
448
447
  static toJsonSchema: () => any
449
448
  /** @deprecated Example Data support is disabled. To enable, set `exampleData: true` in tsPlugin options. */
@@ -452,7 +451,7 @@ export declare class RecoveryFactorForm {
452
451
 
453
452
  /**
454
453
  * Atscript interface **ChangePasswordForm**
455
- * @see {@link ./forms.as:923:18}
454
+ * @see {@link ./forms.as:910:18}
456
455
  */
457
456
  export declare class ChangePasswordForm {
458
457
  // intro: ui.paragraph
@@ -472,7 +471,7 @@ export declare class ChangePasswordForm {
472
471
 
473
472
  /**
474
473
  * Atscript interface **ProveControlForm**
475
- * @see {@link ./forms.as:988:18}
474
+ * @see {@link ./forms.as:975:18}
476
475
  */
477
476
  export declare class ProveControlForm {
478
477
  // intro: ui.paragraph
@@ -490,7 +489,7 @@ export declare class ProveControlForm {
490
489
 
491
490
  /**
492
491
  * Atscript interface **ProveControlOtpForm**
493
- * @see {@link ./forms.as:1023:18}
492
+ * @see {@link ./forms.as:1010:18}
494
493
  */
495
494
  export declare class ProveControlOtpForm {
496
495
  // intro: ui.paragraph
@@ -509,7 +508,7 @@ export declare class ProveControlOtpForm {
509
508
 
510
509
  /**
511
510
  * Atscript interface **AuthorizeConsentForm**
512
- * @see {@link ./forms.as:1075:18}
511
+ * @see {@link ./forms.as:1062:18}
513
512
  */
514
513
  export declare class AuthorizeConsentForm {
515
514
  // notice: ui.paragraph