@@ -28,8 +28,7 @@ const DEFAULT_CONTEXT: MfaContext = {
2828
2929/**
3030 * MFA state machine. The top level models the modal lifecycle (`closed` -> `open` -> `closing`); the
31- * child states of `open` map 1:1 to the screen the user currently sees. Later slices add screens as
32- * `open` children and per-screen work as child states of its screen.
31+ * child states of `open` map 1:1 to the screen the user currently sees.
3332 *
3433 * No state is `final`: one long-lived actor serves every MFA flow (a top-level final state would
3534 * stop it).
@@ -106,8 +105,7 @@ const MFAMachine = setup({
106105 } ,
107106 states : {
108107 // This is the transparent initial screen, and its child states run the pre-screen
109- // work the user waits through. This slice adds the device check, and later slices add
110- // the registration and authorization steps as siblings.
108+ // work the user waits through.
111109 [ MFA_STATE . PREPARING ] : {
112110 initial : MFA_STATE . VALIDATING_DEVICE ,
113111 states : {
@@ -122,9 +120,8 @@ const MFAMachine = setup({
122120 return { allowedAuthenticationMethods : context . scenario . allowedAuthenticationMethods } ;
123121 } ,
124122 // Every result enters the outcome resolver. A refusal stores its
125- // blocking MFAError first; the resolver then selects failure from that
126- // error, while an eligible device with no error selects success until
127- // later slices insert registration and authorization before outcome.
123+ // blocking MFAError first, so the resolver selects failure from that
124+ // error, while an eligible device with no error selects success.
128125 onDone : [
129126 { guard : ( { event} ) => event . output . success , target : OUTCOME_TARGET } ,
130127 { target : OUTCOME_TARGET , actions : assign ( { error : ( { event} ) => getMFAFailureError ( event . output ) } ) } ,
0 commit comments