Skip to content

Commit 97cf564

Browse files
committed
docs(mfa): drop the slice roadmap notes from comments
1 parent 096903c commit 97cf564

3 files changed

Lines changed: 6 additions & 11 deletions

File tree

src/components/MultifactorAuthentication/Context/MultifactorAuthenticationMainContext.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ function MultifactorAuthenticationContextProvider({children}: MultifactorAuthent
8787
const closeModal = () => send({type: 'CLOSE_MODAL'});
8888
const notifyModalClosed = () => send({type: 'MODAL_CLOSED'});
8989

90-
// The cancel-confirmation dialog lands in a later slice; until then every cancel path closes the modal directly.
90+
// There is no cancel-confirmation dialog yet, so every cancel path closes the modal directly.
9191
const requestCancel = () => send({type: 'CLOSE_MODAL'});
9292
const hideCancelConfirm = () => send({type: 'CLOSE_MODAL'});
9393
const confirmCancel = () => send({type: 'CLOSE_MODAL'});

src/components/MultifactorAuthentication/machine/mfaMachine.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -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)})},

src/components/MultifactorAuthentication/machine/types.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,7 @@ type MultifactorAuthenticationInitEvent<T extends MultifactorAuthenticationScena
5555
};
5656

5757
/**
58-
* Events accepted by the machine. INIT starts a flow and the lifecycle events drive the modal. Other
59-
* semantic input events such as validate code and soft prompt are added by the slices that introduce
60-
* their states.
58+
* Events accepted by the machine. INIT starts a flow and the lifecycle events drive the modal.
6159
*
6260
* CLOSE_MODAL requests the close so the flow moves to `closing`. MODAL_CLOSED is the navigator's
6361
* notification that the close animation fully finished, which moves `closing` to `closed` and wipes

0 commit comments

Comments
 (0)