Sequenceeditorial

Login and Token Issue

A sequence diagram of a login: the client posts credentials, the auth service checks the user store and returns a token.

Start from this template

Opens in the editor. No signup. Export SVG, PNG, or an embed link.


Source text
title: Login and Token Issue
theme: editorial
type: sequence
participant client "Client"
participant api "API"
participant auth "Auth service"
participant users "User store"
client -> api : "POST /login"
api -> auth : "verify credentials"
auth -> users : "find user"
users --> auth : "user record"
auth --> api : "token"
api --> client : "200 OK + token"

About this template

A sequence diagram of a login request. The client posts credentials to the API, the API asks the auth service to verify them, and the auth service looks up the user in the user store. Replies (dashed arrows) carry the user record, then a token, back to the client.

Use it in API docs or security reviews to show which component checks passwords and which one issues tokens. Keeping that responsibility in one place is the main thing reviewers look for.

Typical edits are renaming the participants to your real services or adding a refresh-token step. Each message is one line, so adding a step means adding one line in the right place.