@aooth/auth-moost 0.1.9 → 0.1.10

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.
@@ -1,2 +1,2 @@
1
- import { C as SetPasswordForm, E as WithInlineConsentForm, S as Select2faForm, T as TermsBumpForm, _ as ProveControlForm, a as EmailIdentifierForm, b as RecoveryModeSelectForm, c as EnrollPickMethodForm, d as LoginCredentialsForm, f as MagicLinkRequestForm, g as PincodeForm, h as PasswordReauthForm, i as ConcurrencyLimitForm, l as EnrollTotpQrForm, m as MfaCodeForm, n as AskPhoneForm, o as EnrollAddressForm, p as ManageMfaForm, r as ChangePasswordForm, s as EnrollConfirmForm, t as AskEmailForm, u as InviteForm, v as ProveControlOtpForm, w as SignupForm, x as RemoveMfaConfirmForm, y as RecoveryFactorForm } from "../forms-DV4UcC29.mjs";
1
+ import { C as SetPasswordForm, E as WithInlineConsentForm, S as Select2faForm, T as TermsBumpForm, _ as ProveControlForm, a as EmailIdentifierForm, b as RecoveryModeSelectForm, c as EnrollPickMethodForm, d as LoginCredentialsForm, f as MagicLinkRequestForm, g as PincodeForm, h as PasswordReauthForm, i as ConcurrencyLimitForm, l as EnrollTotpQrForm, m as MfaCodeForm, n as AskPhoneForm, o as EnrollAddressForm, p as ManageMfaForm, r as ChangePasswordForm, s as EnrollConfirmForm, t as AskEmailForm, u as InviteForm, v as ProveControlOtpForm, w as SignupForm, x as RemoveMfaConfirmForm, y as RecoveryFactorForm } from "../forms-11EDZgS1.mjs";
2
2
  export { AskEmailForm, AskPhoneForm, ChangePasswordForm, ConcurrencyLimitForm, EmailIdentifierForm, EnrollAddressForm, EnrollConfirmForm, EnrollPickMethodForm, EnrollTotpQrForm, InviteForm, LoginCredentialsForm, MagicLinkRequestForm, ManageMfaForm, MfaCodeForm, PasswordReauthForm, PincodeForm, ProveControlForm, ProveControlOtpForm, RecoveryFactorForm, RecoveryModeSelectForm, RemoveMfaConfirmForm, Select2faForm, SetPasswordForm, SignupForm, TermsBumpForm, WithInlineConsentForm };
@@ -1,2 +1,2 @@
1
- import { C as SetPasswordForm, E as WithInlineConsentForm, S as Select2faForm, T as TermsBumpForm, _ as ProveControlForm, a as EmailIdentifierForm, b as RecoveryModeSelectForm, c as EnrollPickMethodForm, d as LoginCredentialsForm, f as MagicLinkRequestForm, g as PincodeForm, h as PasswordReauthForm, i as ConcurrencyLimitForm, l as EnrollTotpQrForm, m as MfaCodeForm, n as AskPhoneForm, o as EnrollAddressForm, p as ManageMfaForm, r as ChangePasswordForm, s as EnrollConfirmForm, t as AskEmailForm, u as InviteForm, v as ProveControlOtpForm, w as SignupForm, x as RemoveMfaConfirmForm, y as RecoveryFactorForm } from "../forms-DV4UcC29.mjs";
1
+ import { C as SetPasswordForm, E as WithInlineConsentForm, S as Select2faForm, T as TermsBumpForm, _ as ProveControlForm, a as EmailIdentifierForm, b as RecoveryModeSelectForm, c as EnrollPickMethodForm, d as LoginCredentialsForm, f as MagicLinkRequestForm, g as PincodeForm, h as PasswordReauthForm, i as ConcurrencyLimitForm, l as EnrollTotpQrForm, m as MfaCodeForm, n as AskPhoneForm, o as EnrollAddressForm, p as ManageMfaForm, r as ChangePasswordForm, s as EnrollConfirmForm, t as AskEmailForm, u as InviteForm, v as ProveControlOtpForm, w as SignupForm, x as RemoveMfaConfirmForm, y as RecoveryFactorForm } from "../forms-11EDZgS1.mjs";
2
2
  export { AskEmailForm, AskPhoneForm, ChangePasswordForm, ConcurrencyLimitForm, EmailIdentifierForm, EnrollAddressForm, EnrollConfirmForm, EnrollPickMethodForm, EnrollTotpQrForm, InviteForm, LoginCredentialsForm, MagicLinkRequestForm, ManageMfaForm, MfaCodeForm, PasswordReauthForm, PincodeForm, ProveControlForm, ProveControlOtpForm, RecoveryFactorForm, RecoveryModeSelectForm, RemoveMfaConfirmForm, Select2faForm, SetPasswordForm, SignupForm, TermsBumpForm, WithInlineConsentForm };
@@ -345,14 +345,14 @@ defineAnnotatedType("object", EnrollPickMethodForm).prop("method", defineAnnotat
345
345
  }).annotate("ui.form.fn.hidden", "(_, _d, ctx) => ctx.public?.mfaEnroll?.mode !== \"optional\"").optional().$type).prop("cancel", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.action", {
346
346
  id: "cancel",
347
347
  label: "Cancel"
348
- }).annotate("ui.form.fn.hidden", "(_, _d, ctx) => ctx.public?.mfaEnroll?.mode !== \"manage\"").optional().$type).annotate("meta.label", "Set up two-factor authentication").annotate("meta.description", "Pick a method to receive your verification codes.").annotate("wf.context.pass", "public", true).annotate("ui.form.submit.text", "Continue");
349
- defineAnnotatedType("object", EnrollAddressForm).prop("address", defineAnnotatedType().designType("string").tags("string").annotate("ui.form.order", 10).annotate("ui.form.type", "text").annotate("meta.label", "Address").annotate("meta.required", {}).annotate("ui.form.validate", "(v, _d, ctx) => ctx.public?.mfaEnroll?.method !== \"email\" || /^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$/.test(v) || \"Enter a valid email address\"", true).$type).prop("skip", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.action", {
348
+ }).annotate("ui.form.fn.hidden", "() => true").optional().$type).annotate("meta.label", "Set up two-factor authentication").annotate("meta.description", "Pick a method to receive your verification codes.").annotate("wf.context.pass", "public", true).annotate("ui.form.submit.text", "Continue");
349
+ defineAnnotatedType("object", EnrollAddressForm).prop("address", defineAnnotatedType().designType("string").tags("string").annotate("ui.form.order", 10).annotate("ui.form.type", "text").annotate("meta.label", "Address").annotate("ui.form.fn.label", "(_, _d, ctx) => ctx.public?.mfaEnroll?.method === \"sms\" ? \"Phone number\" : ctx.public?.mfaEnroll?.method === \"email\" ? \"Email address\" : \"Address\"").annotate("meta.required", {}).annotate("ui.form.validate", "(v, _d, ctx) => ctx.public?.mfaEnroll?.method !== \"email\" || /^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$/.test(v) || \"Enter a valid email address\"", true).$type).prop("skip", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.action", {
350
350
  id: "skip",
351
351
  label: "Skip for now"
352
352
  }).annotate("ui.form.fn.hidden", "(_, _d, ctx) => ctx.public?.mfaEnroll?.mode !== \"optional\"").optional().$type).prop("cancel", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.action", {
353
353
  id: "cancel",
354
354
  label: "Cancel"
355
- }).annotate("ui.form.fn.hidden", "(_, _d, ctx) => ctx.public?.mfaEnroll?.mode !== \"manage\"").optional().$type).prop("useDifferentMethod", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.action", {
355
+ }).annotate("ui.form.fn.hidden", "() => true").optional().$type).prop("useDifferentMethod", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.action", {
356
356
  id: "useDifferentMethod",
357
357
  label: "Use a different method"
358
358
  }).annotate("ui.form.fn.hidden", "(_, _d, ctx) => (ctx.public?.mfaEnroll?.availableTransports?.length ?? 0) < 2 || ctx.public?.mfaEnroll?.mode === \"manage\"").optional().$type).annotate("ui.form.fn.title", "(_, _d, ctx) => ctx.public?.mfaEnroll?.method === \"sms\" ? \"Add your phone number\" : \"Add your email\"").annotate("meta.description", "We will send you a one-time code to confirm.").annotate("wf.context.pass", "public", true).annotate("ui.form.submit.text", "Send code");
@@ -368,7 +368,7 @@ defineAnnotatedType("object", EnrollConfirmForm).prop("transportHint", defineAnn
368
368
  }).annotate("ui.form.fn.hidden", "(_, _d, ctx) => (ctx.public?.mfaEnroll?.availableTransports?.length ?? 0) < 2 || ctx.public?.mfaEnroll?.mode === \"manage\"").optional().$type).prop("cancel", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.action", {
369
369
  id: "cancel",
370
370
  label: "Cancel"
371
- }).annotate("ui.form.fn.hidden", "(_, _d, ctx) => ctx.public?.mfaEnroll?.mode !== \"manage\"").optional().$type).prop("skip", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.action", {
371
+ }).annotate("ui.form.fn.hidden", "() => true").optional().$type).prop("skip", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.action", {
372
372
  id: "skip",
373
373
  label: "Skip for now"
374
374
  }).annotate("ui.form.fn.hidden", "(_, _d, ctx) => ctx.public?.mfaEnroll?.mode !== \"optional\"").optional().$type).annotate("meta.label", "Confirm your verification code").annotate("wf.context.pass", "public", true).annotate("ui.form.submit.text", "Confirm");
@@ -381,22 +381,22 @@ defineAnnotatedType("object", EnrollTotpQrForm).prop("qrCode", defineAnnotatedTy
381
381
  }).annotate("ui.form.fn.hidden", "(_, _d, ctx) => (ctx.public?.mfaEnroll?.availableTransports?.length ?? 0) < 2 || ctx.public?.mfaEnroll?.mode === \"manage\"").optional().$type).prop("cancel", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.action", {
382
382
  id: "cancel",
383
383
  label: "Cancel"
384
- }).annotate("ui.form.fn.hidden", "(_, _d, ctx) => ctx.public?.mfaEnroll?.mode !== \"manage\"").optional().$type).prop("skip", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.action", {
384
+ }).annotate("ui.form.fn.hidden", "() => true").optional().$type).prop("skip", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.action", {
385
385
  id: "skip",
386
386
  label: "Skip for now"
387
387
  }).annotate("ui.form.fn.hidden", "(_, _d, ctx) => ctx.public?.mfaEnroll?.mode !== \"optional\"").optional().$type).annotate("meta.label", "Scan this QR code").annotate("meta.description", "Open your authenticator app and scan the code (or enter the key manually), then continue to enter the code it shows.").annotate("wf.context.pass", "public", true).annotate("ui.form.submit.text", "Continue");
388
388
  defineAnnotatedType("object", ManageMfaForm).prop("lockedNote", defineAnnotatedType().designType("phantom").tags("paragraph", "ui").annotate("ui.form.order", 5).annotate("ui.form.fn.value", "(_, _d, ctx) => (ctx.public?.manage?.locked?.length ?? 0) > 0 ? \"Some methods are also used to sign in and can’t be changed here.\" : \"\"").annotate("ui.form.fn.hidden", "(_, _d, ctx) => (ctx.public?.manage?.locked?.length ?? 0) === 0").$type).prop("operation", defineAnnotatedType().designType("string").tags("string").annotate("ui.form.order", 10).annotate("ui.form.type", "radio").annotate("ui.form.fn.options", "(_, _d, ctx) => { const lbl = (t) => t === \"totp\" ? \"authenticator app\" : t === \"sms\" ? \"SMS\" : t === \"email\" ? \"email\" : t; const locked = ctx.public?.manage?.locked ?? []; const out = []; for (const t of (ctx.public?.manage?.candidates ?? [])) out.push({ key: \"add:\" + t, label: \"Add \" + lbl(t) }); for (const m of (ctx.public?.mfa?.enrolledMethods ?? [])) { if (locked.includes(m.kind)) continue; out.push({ key: \"replace:\" + m.kind, label: \"Change \" + lbl(m.kind) + (m.masked ? \" (\" + m.masked + \")\" : \"\") }); out.push({ key: \"remove:\" + m.kind, label: \"Remove \" + lbl(m.kind) }); } return out; }").annotate("meta.label", "What would you like to do?").annotate("meta.required", {}).$type).prop("cancel", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.action", {
389
389
  id: "cancel",
390
390
  label: "Cancel"
391
- }).optional().$type).annotate("meta.label", "Manage two-factor authentication").annotate("meta.description", "Add, change, or remove a verification method.").annotate("wf.context.pass", "public", true).annotate("ui.form.submit.text", "Continue");
391
+ }).annotate("ui.form.fn.hidden", "() => true").optional().$type).annotate("meta.label", "Manage two-factor authentication").annotate("meta.description", "Add, change, or remove a verification method.").annotate("wf.context.pass", "public", true).annotate("ui.form.submit.text", "Continue");
392
392
  defineAnnotatedType("object", RemoveMfaConfirmForm).prop("notice", defineAnnotatedType().designType("phantom").tags("paragraph", "ui").annotate("ui.form.order", 1).annotate("ui.form.fn.value", "(_, _d, ctx) => { const t = ctx.public?.mfaEnroll?.method; const lbl = t === \"totp\" ? \"your authenticator app\" : t === \"sms\" ? \"SMS codes\" : t === \"email\" ? \"email codes\" : \"this method\"; return \"Remove \" + lbl + \" as a two-factor method? You can set it up again later.\"; }").$type).prop("cancel", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.action", {
393
393
  id: "cancel",
394
394
  label: "Cancel"
395
- }).optional().$type).annotate("meta.label", "Remove this method?").annotate("wf.context.pass", "public", true).annotate("ui.form.submit.text", "Remove");
395
+ }).annotate("ui.form.fn.hidden", "() => true").optional().$type).annotate("meta.label", "Remove this method?").annotate("wf.context.pass", "public", true).annotate("ui.form.submit.text", "Remove");
396
396
  defineAnnotatedType("object", PasswordReauthForm).prop("password", defineAnnotatedType().designType("string").tags("string").annotate("ui.form.order", 10).annotate("ui.form.type", "password").annotate("meta.label", "Password").annotate("ui.form.autocomplete", "current-password").annotate("meta.sensitive", true).annotate("meta.required", {}).annotate("expect.minLength", { length: 1 }).$type).prop("cancel", defineAnnotatedType().designType("phantom").tags("action", "ui").annotate("ui.form.action", {
397
397
  id: "cancel",
398
398
  label: "Cancel"
399
- }).optional().$type).annotate("meta.label", "Confirm your password").annotate("meta.description", "Re-enter your account password to manage your two-factor methods.").annotate("wf.context.pass", "public", true).annotate("ui.form.submit.text", "Verify");
399
+ }).annotate("ui.form.fn.hidden", "() => true").optional().$type).annotate("meta.label", "Confirm your password").annotate("meta.description", "Re-enter your account password to manage your two-factor methods.").annotate("wf.context.pass", "public", true).annotate("ui.form.submit.text", "Verify");
400
400
  defineAnnotatedType("object", TermsBumpForm).prop("consents", defineAnnotatedType("array").of(defineAnnotatedType().designType("string").tags("string").$type).annotate("meta.label", "Pending consents").annotate("ui.form.component", "AsConsentArray").annotate("ui.form.fn.attr", {
401
401
  name: "pendingConsents",
402
402
  fn: "(_, _d, ctx) => ctx.public?.consents?.pending"
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { C as SetPasswordForm, S as Select2faForm, T as TermsBumpForm, _ as ProveControlForm, a as EmailIdentifierForm, c as EnrollPickMethodForm, d as LoginCredentialsForm, g as PincodeForm, h as PasswordReauthForm, i as ConcurrencyLimitForm, l as EnrollTotpQrForm, m as MfaCodeForm, n as AskPhoneForm, o as EnrollAddressForm, p as ManageMfaForm, r as ChangePasswordForm, s as EnrollConfirmForm, t as AskEmailForm, u as InviteForm, v as ProveControlOtpForm, w as SignupForm, x as RemoveMfaConfirmForm } from "./forms-DV4UcC29.mjs";
1
+ import { C as SetPasswordForm, S as Select2faForm, T as TermsBumpForm, _ as ProveControlForm, a as EmailIdentifierForm, c as EnrollPickMethodForm, d as LoginCredentialsForm, g as PincodeForm, h as PasswordReauthForm, i as ConcurrencyLimitForm, l as EnrollTotpQrForm, m as MfaCodeForm, n as AskPhoneForm, o as EnrollAddressForm, p as ManageMfaForm, r as ChangePasswordForm, s as EnrollConfirmForm, t as AskEmailForm, u as InviteForm, v as ProveControlOtpForm, w as SignupForm, x as RemoveMfaConfirmForm } from "./forms-11EDZgS1.mjs";
2
2
  import { Controller, HandlerPaths, Inherit, Inject, InjectMoostLogger, Injectable, Intercept, MoostInit, Optional, Param, Resolve, TInterceptorPriority, defineAfterInterceptor, defineBeforeInterceptor, getMoostMate, useControllerContext } from "moost";
3
3
  import { AuthCredential, AuthError, generateMagicLinkToken } from "@aooth/auth";
4
4
  import { current, defineWook, eventTypeKey, key } from "@wooksjs/event-core";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aooth/auth-moost",
3
- "version": "0.1.9",
3
+ "version": "0.1.10",
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.90",
60
+ "@atscript/moost-wf": "^0.1.91",
61
61
  "@wooksjs/http-body": "^0.7.17",
62
- "@aooth/arbac-moost": "^0.1.9",
63
- "@aooth/idp": "0.1.9",
64
- "@aooth/auth": "0.1.9",
65
- "@aooth/user": "0.1.9"
62
+ "@aooth/arbac-moost": "^0.1.10",
63
+ "@aooth/auth": "0.1.10",
64
+ "@aooth/idp": "0.1.10",
65
+ "@aooth/user": "0.1.10"
66
66
  },
67
67
  "devDependencies": {
68
- "@atscript/core": "^0.1.70",
69
- "@atscript/typescript": "^0.1.70",
70
- "@atscript/ui": "^0.1.90",
71
- "@atscript/ui-fns": "^0.1.90",
72
- "@moostjs/event-http": "^0.6.23",
73
- "@moostjs/event-wf": "^0.6.23",
74
- "moost": "^0.6.23",
75
- "unplugin-atscript": "^0.1.70",
68
+ "@atscript/core": "^0.1.71",
69
+ "@atscript/typescript": "^0.1.71",
70
+ "@atscript/ui": "^0.1.91",
71
+ "@atscript/ui-fns": "^0.1.91",
72
+ "@moostjs/event-http": "^0.6.24",
73
+ "@moostjs/event-wf": "^0.6.24",
74
+ "moost": "^0.6.24",
75
+ "unplugin-atscript": "^0.1.71",
76
76
  "wooks": "^0.7.17"
77
77
  },
78
78
  "peerDependencies": {
79
- "@atscript/moost-wf": "^0.1.90",
80
- "@atscript/typescript": "^0.1.70",
81
- "@moostjs/event-http": "^0.6.23",
82
- "@moostjs/event-wf": "^0.6.23",
79
+ "@atscript/moost-wf": "^0.1.91",
80
+ "@atscript/typescript": "^0.1.71",
81
+ "@moostjs/event-http": "^0.6.24",
82
+ "@moostjs/event-wf": "^0.6.24",
83
83
  "@wooksjs/event-core": "^0.7.17",
84
84
  "@wooksjs/event-http": "^0.7.17",
85
85
  "@wooksjs/http-body": "^0.7.17",
86
- "moost": "^0.6.23"
86
+ "moost": "^0.6.24"
87
87
  },
88
88
  "peerDependenciesMeta": {
89
89
  "@atscript/typescript": {
@@ -521,9 +521,11 @@ export interface EnrollPickMethodForm {
521
521
  skip?: ui.action
522
522
 
523
523
  // Manage-MFA only: the user opened this on purpose, so "Skip" makes no
524
- // sense — offer a clean cancel instead.
524
+ // sense — a `cancel` action is declared instead (host-rendered, see below).
525
+ // Built-in cancel hidden but kept whitelisted so a host can fire it — see
526
+ // auth-moost CLAUDE.md "Manage-MFA host cancel" (consumer renders its own).
525
527
  @ui.form.action 'cancel', 'Cancel'
526
- @ui.form.fn.hidden '(_, _d, ctx) => ctx.public?.mfaEnroll?.mode !== "manage"'
528
+ @ui.form.fn.hidden '() => true'
527
529
  cancel?: ui.action
528
530
  }
529
531
 
@@ -542,7 +544,13 @@ export interface EnrollPickMethodForm {
542
544
  export interface EnrollAddressForm {
543
545
  @ui.form.order 10
544
546
  @ui.form.type 'text'
547
+ // Transport-aware label: this single field collects either a phone number
548
+ // (sms) or an email (email), so the label reads the chosen transport off
549
+ // `ctx.public.mfaEnroll.method`. `@meta.label 'Address'` is the static
550
+ // fallback when `@atscript/ui-fns` is absent (the fn key overrides it when
551
+ // present — fn wins over static, else static is the fallback).
545
552
  @meta.label 'Address'
553
+ @ui.form.fn.label '(_, _d, ctx) => ctx.public?.mfaEnroll?.method === "sms" ? "Phone number" : ctx.public?.mfaEnroll?.method === "email" ? "Email address" : "Address"'
546
554
  @meta.required
547
555
  // Client-side format hint — email branch must look like an email; the SMS
548
556
  // branch stays free-form (server-side E.164 normalization). The robust
@@ -554,8 +562,10 @@ export interface EnrollAddressForm {
554
562
  @ui.form.fn.hidden '(_, _d, ctx) => ctx.public?.mfaEnroll?.mode !== "optional"'
555
563
  skip?: ui.action
556
564
 
565
+ // Built-in cancel hidden but kept whitelisted so a host can fire it — see
566
+ // auth-moost CLAUDE.md "Manage-MFA host cancel" (consumer renders its own).
557
567
  @ui.form.action 'cancel', 'Cancel'
558
- @ui.form.fn.hidden '(_, _d, ctx) => ctx.public?.mfaEnroll?.mode !== "manage"'
568
+ @ui.form.fn.hidden '() => true'
559
569
  cancel?: ui.action
560
570
 
561
571
  @ui.form.action 'useDifferentMethod', 'Use a different method'
@@ -601,8 +611,10 @@ export interface EnrollConfirmForm {
601
611
  @ui.form.fn.hidden '(_, _d, ctx) => (ctx.public?.mfaEnroll?.availableTransports?.length ?? 0) < 2 || ctx.public?.mfaEnroll?.mode === "manage"'
602
612
  useDifferentMethod?: ui.action
603
613
 
614
+ // Built-in cancel hidden but kept whitelisted so a host can fire it — see
615
+ // auth-moost CLAUDE.md "Manage-MFA host cancel" (consumer renders its own).
604
616
  @ui.form.action 'cancel', 'Cancel'
605
- @ui.form.fn.hidden '(_, _d, ctx) => ctx.public?.mfaEnroll?.mode !== "manage"'
617
+ @ui.form.fn.hidden '() => true'
606
618
  cancel?: ui.action
607
619
 
608
620
  @ui.form.action 'skip', 'Skip for now'
@@ -636,8 +648,10 @@ export interface EnrollTotpQrForm {
636
648
  @ui.form.fn.hidden '(_, _d, ctx) => (ctx.public?.mfaEnroll?.availableTransports?.length ?? 0) < 2 || ctx.public?.mfaEnroll?.mode === "manage"'
637
649
  useDifferentMethod?: ui.action
638
650
 
651
+ // Built-in cancel hidden but kept whitelisted so a host can fire it — see
652
+ // auth-moost CLAUDE.md "Manage-MFA host cancel" (consumer renders its own).
639
653
  @ui.form.action 'cancel', 'Cancel'
640
- @ui.form.fn.hidden '(_, _d, ctx) => ctx.public?.mfaEnroll?.mode !== "manage"'
654
+ @ui.form.fn.hidden '() => true'
641
655
  cancel?: ui.action
642
656
 
643
657
  @ui.form.action 'skip', 'Skip for now'
@@ -675,7 +689,10 @@ export interface ManageMfaForm {
675
689
  @meta.required
676
690
  operation: string
677
691
 
692
+ // Hidden built-in cancel — host renders its own and fires `cancel` on
693
+ // abandon (so the durable wf-state row is cleaned, not left to expire).
678
694
  @ui.form.action 'cancel', 'Cancel'
695
+ @ui.form.fn.hidden '() => true'
679
696
  cancel?: ui.action
680
697
  }
681
698
 
@@ -693,7 +710,10 @@ export interface RemoveMfaConfirmForm {
693
710
  @ui.form.fn.value '(_, _d, ctx) => { const t = ctx.public?.mfaEnroll?.method; const lbl = t === "totp" ? "your authenticator app" : t === "sms" ? "SMS codes" : t === "email" ? "email codes" : "this method"; return "Remove " + lbl + " as a two-factor method? You can set it up again later."; }'
694
711
  notice: ui.paragraph
695
712
 
713
+ // Hidden built-in cancel — host renders its own and fires `cancel` on
714
+ // abandon (so the durable wf-state row is cleaned, not left to expire).
696
715
  @ui.form.action 'cancel', 'Cancel'
716
+ @ui.form.fn.hidden '() => true'
697
717
  cancel?: ui.action
698
718
  }
699
719
 
@@ -718,7 +738,10 @@ export interface PasswordReauthForm {
718
738
  @expect.minLength 1
719
739
  password: string
720
740
 
741
+ // Hidden built-in cancel — host renders its own and fires `cancel` on
742
+ // abandon (so the durable wf-state row is cleaned, not left to expire).
721
743
  @ui.form.action 'cancel', 'Cancel'
744
+ @ui.form.fn.hidden '() => true'
722
745
  cancel?: ui.action
723
746
  }
724
747
 
@@ -227,7 +227,7 @@ export declare class EnrollPickMethodForm {
227
227
 
228
228
  /**
229
229
  * Atscript interface **EnrollAddressForm**
230
- * @see {@link ./forms.as:542:18}
230
+ * @see {@link ./forms.as:544:18}
231
231
  */
232
232
  export declare class EnrollAddressForm {
233
233
  address: string
@@ -246,7 +246,7 @@ export declare class EnrollAddressForm {
246
246
 
247
247
  /**
248
248
  * Atscript interface **EnrollConfirmForm**
249
- * @see {@link ./forms.as:580:18}
249
+ * @see {@link ./forms.as:590:18}
250
250
  */
251
251
  export declare class EnrollConfirmForm {
252
252
  // transportHint: ui.paragraph
@@ -267,7 +267,7 @@ export declare class EnrollConfirmForm {
267
267
 
268
268
  /**
269
269
  * Atscript interface **EnrollTotpQrForm**
270
- * @see {@link ./forms.as:628:18}
270
+ * @see {@link ./forms.as:640:18}
271
271
  */
272
272
  export declare class EnrollTotpQrForm {
273
273
  // qrCode: ui.paragraph
@@ -286,7 +286,7 @@ export declare class EnrollTotpQrForm {
286
286
 
287
287
  /**
288
288
  * Atscript interface **ManageMfaForm**
289
- * @see {@link ./forms.as:665:18}
289
+ * @see {@link ./forms.as:679:18}
290
290
  */
291
291
  export declare class ManageMfaForm {
292
292
  // lockedNote: ui.paragraph
@@ -304,7 +304,7 @@ export declare class ManageMfaForm {
304
304
 
305
305
  /**
306
306
  * Atscript interface **RemoveMfaConfirmForm**
307
- * @see {@link ./forms.as:691:18}
307
+ * @see {@link ./forms.as:708:18}
308
308
  */
309
309
  export declare class RemoveMfaConfirmForm {
310
310
  // notice: ui.paragraph
@@ -321,7 +321,7 @@ export declare class RemoveMfaConfirmForm {
321
321
 
322
322
  /**
323
323
  * Atscript interface **PasswordReauthForm**
324
- * @see {@link ./forms.as:711:18}
324
+ * @see {@link ./forms.as:731:18}
325
325
  */
326
326
  export declare class PasswordReauthForm {
327
327
  password: string
@@ -338,7 +338,7 @@ export declare class PasswordReauthForm {
338
338
 
339
339
  /**
340
340
  * Atscript interface **TermsBumpForm**
341
- * @see {@link ./forms.as:737:18}
341
+ * @see {@link ./forms.as:760:18}
342
342
  */
343
343
  export declare class TermsBumpForm extends WithInlineConsentForm {
344
344
  static __is_atscript_annotated_type: true
@@ -353,7 +353,7 @@ export declare class TermsBumpForm extends WithInlineConsentForm {
353
353
 
354
354
  /**
355
355
  * Atscript interface **ConcurrencyLimitForm**
356
- * @see {@link ./forms.as:750:18}
356
+ * @see {@link ./forms.as:773:18}
357
357
  */
358
358
  export declare class ConcurrencyLimitForm {
359
359
  static __is_atscript_annotated_type: true
@@ -368,7 +368,7 @@ export declare class ConcurrencyLimitForm {
368
368
 
369
369
  /**
370
370
  * Atscript interface **MagicLinkRequestForm**
371
- * @see {@link ./forms.as:760:18}
371
+ * @see {@link ./forms.as:783:18}
372
372
  */
373
373
  export declare class MagicLinkRequestForm {
374
374
  identifier: string
@@ -384,7 +384,7 @@ export declare class MagicLinkRequestForm {
384
384
 
385
385
  /**
386
386
  * Atscript interface **RecoveryModeSelectForm**
387
- * @see {@link ./forms.as:775:18}
387
+ * @see {@link ./forms.as:798:18}
388
388
  */
389
389
  export declare class RecoveryModeSelectForm {
390
390
  mode: string
@@ -400,7 +400,7 @@ export declare class RecoveryModeSelectForm {
400
400
 
401
401
  /**
402
402
  * Atscript interface **RecoveryFactorForm**
403
- * @see {@link ./forms.as:798:18}
403
+ * @see {@link ./forms.as:821:18}
404
404
  */
405
405
  export declare class RecoveryFactorForm {
406
406
  factor: string
@@ -417,7 +417,7 @@ export declare class RecoveryFactorForm {
417
417
 
418
418
  /**
419
419
  * Atscript interface **ChangePasswordForm**
420
- * @see {@link ./forms.as:832:18}
420
+ * @see {@link ./forms.as:855:18}
421
421
  */
422
422
  export declare class ChangePasswordForm {
423
423
  // intro: ui.paragraph
@@ -437,7 +437,7 @@ export declare class ChangePasswordForm {
437
437
 
438
438
  /**
439
439
  * Atscript interface **ProveControlForm**
440
- * @see {@link ./forms.as:897:18}
440
+ * @see {@link ./forms.as:920:18}
441
441
  */
442
442
  export declare class ProveControlForm {
443
443
  // intro: ui.paragraph
@@ -455,7 +455,7 @@ export declare class ProveControlForm {
455
455
 
456
456
  /**
457
457
  * Atscript interface **ProveControlOtpForm**
458
- * @see {@link ./forms.as:932:18}
458
+ * @see {@link ./forms.as:955:18}
459
459
  */
460
460
  export declare class ProveControlOtpForm {
461
461
  // intro: ui.paragraph