Templates / sequenceDiagram

Two-factor authentication

A TOTP-based second factor challenge after a successful password check.

Open in studio

Preview

Mermaid 11 renderer

Rendering preview...

Mermaid source

sequenceDiagram

sequenceDiagram
    actor User
    participant App
    participant API as Auth API
    participant Authenticator as Authenticator app

    User->>App: Enter username and password
    App->>API: Verify credentials
    API-->>App: Credentials valid, MFA required
    App-->>User: Prompt for 6-digit code
    User->>Authenticator: Read current code
    User->>App: Submit code
    App->>API: Verify TOTP code
    API-->>App: Code valid
    App-->>User: Grant session

More templates