User authentication flow (with MFA)
A user authentication flow (login flow) is a flowchart of how a person signs in: open the login page, validate credentials, optionally complete multi-factor authentication (MFA), create a session, and land on the dashboard. Retry loops for invalid credentials or invalid codes are part of the real path — and they are exactly where stock Mermaid layout usually fails.
On this graph, stock Mermaid strings the whole login → MFA → session path into one shallow band roughly 1600px wide, so at page width the node labels shrink toward illegibility. The “No” edge that bypasses MFA floats its label over empty canvas far from either endpoint, and both retry loops (invalid credentials, invalid MFA code) render as overlapping twin arcs where the label cannot be attributed to a direction. Line9 lays out the same Mermaid source as a compact two-band flowchart with every edge label on its edge — credentials and MFA decisions stay readable without zooming.
For a fuller product comparison — layout, export, CLI, and pricing — see Line9 vs mermaid.live.
More scenarios on the Mermaid examples hub.