Skip to content
Mermaid templates

OAuth 2.0 Authorization Code Flow

Sequence of the OAuth authorization-code grant.

Template previewMermaid
Rendering…

Make it your own.

sequenceDiagram
  participant U as User
  participant C as Client App
  participant A as Auth Server
  participant R as Resource API
  U->>C: Click "Sign in"
  C->>A: Authorization request
  A->>U: Login + consent
  U->>A: Approve
  A-->>C: Authorization code
  C->>A: Exchange code + secret
  A-->>C: Access token
  C->>R: Request with token
  R-->>C: Protected resource