Components in this architecture diagram
- User clicks Sign in
- App creates code verifier & challenge
- Redirect to identity provider /authorize
- Existing session at IdP?
- User enters credentials
- MFA required?
- MFA challenge: app, SMS or passkey
- MFA passed?
- Access denied
- Consent screen
- User consents?
- Redirect back with authorization code
- App exchanges code + verifier for tokens
- Verifier matches challenge?
- Access token & refresh token issued
- Validate ID token signature & claims
- Create app session
- Signed in
How to use this architecture diagram template
- Click Open in the editor. The architecture diagram opens on a new page in FlowDiagram — nothing is uploaded and there is no sign-up.
- Rename, add or delete shapes and drag them where you want; connectors stay attached as things move.
- Drop in vendor logos from the library — 1,160 of them, including every AWS, Azure and Google Cloud service icon — or restyle it with the colour and theme controls.
- Prefer text? Edit the Mermaid source below and paste it in through ☰ → Import diagram (see the Mermaid editor); it imports as an editable diagram.
- Export to PNG, SVG or PDF, or press Ctrl+L for a link that carries the whole diagram.
Mermaid source
The whole template is the text below. Paste it into FlowDiagram, keep it in Git next to the code it describes, or hand it to an AI assistant to extend.
flowchart TD
A((User clicks Sign in)) --> B[App creates code verifier & challenge]
B --> C[Redirect to identity provider /authorize]
C --> D{Existing session at IdP?}
D -->|No| E[User enters credentials]
E --> F{MFA required?}
F -->|Yes| G[MFA challenge: app, SMS or passkey]
G --> H{MFA passed?}
H -->|No| I((Access denied))
H -->|Yes| J[Consent screen]
F -->|No| J
D -->|Yes| J
J --> K{User consents?}
K -->|No| I
K -->|Yes| L[Redirect back with authorization code]
L --> M[App exchanges code + verifier for tokens]
M --> N{Verifier matches challenge?}
N -->|No| I
N -->|Yes| O[Access token & refresh token issued]
O --> P[Validate ID token signature & claims]
P --> Q[Create app session]
Q --> R((Signed in))
Related: System architecture diagram tool · Mermaid editor · All security & identity templates · All 521 templates