Template
Auth sequence
Login handshake between client, app, and identity provider.
sequence
This sequence diagram template models a typical sign-in handshake: the user, your app, and an identity provider exchanging OAuth requests and tokens.
It includes activation bars, a consent note, alt branches for success vs denial, and an optional remember-device step — enough structure to adapt for your auth story.
Use the template in SayDiagram, then tweak participants and messages in Preview or Arrange.
Mermaid source
sequenceDiagram
actor U as User
participant A as App
participant I as IdP
U->>+A: Sign in
A->>+I: OAuth request
Note right of I: Consent screen
I-->>U: Consent
U->>I: Approve
I-->>-A: Token
alt Session ok
A-->>U: Session
else Denied
A-->>U: Error
end
deactivate A
opt Remember device
A->>A: Store cookie
end