A long prose walkthrough of sign-in is easy to write and hard to follow. That is why I diagram an OAuth login flow on one page so nobody gets lost: actors in view, the redirects people trip on, and a clear mark for where the secret stays.
This piece covers which steps belong on the page, what to label, and how the picture is shared. ByteDiagram comes up in a later section and is our product, made by us. Treat those tool notes as a disclosed founder's angle from me as founder.
Why OAuth walkthroughs lose people
Where people get lost in OAuth is rarely the high-level idea of "log in with a provider". It is the middle of the path: which hop is a browser redirect, which hop is a server call, and where a code turns into a token. A wall of paragraphs collapses those hops into one blur.
OAuth 2.0 is an authorization framework with several grant types for different kinds of clients. The useful borrow for a review page is not another RFC walkthrough; it is a shared picture of the path your product actually runs. For the technical authorization-code sequence with PKCE, start with the full oauth flow diagram for the PKCE authorization code grant. This post stays on the habit of drawing a login path reviewers can follow.
Front channel and back channel are worth naming early, even in plain language. Browser redirects are visible to the user and to anything watching the browser; the token exchange that should stay on the server is a different kind of hop. Mixing those two on a prose page is a common way a reader gets stuck.
Native apps and browser-based apps also follow different recommendations in the wider OAuth ecosystem, which is another reason a product-specific picture helps. The review question is which hops your app actually runs, not which grant type a generic tutorial happens to show first.
What I put on the page
The actors, steps and labels that belong on the diagram:
- Actors: the user and browser, the app, the authorization server, and the API that later receives the token.
- Browser hops: the redirect to the authorization server and the redirect back with a code, labelled as redirects.
- Server hop: the app exchanging the code for a token, labelled as a server call.
- Where secrets stay: a mark for any value that must never appear in a redirect URL.
As general guidance for an OAuth login flow for reviewers, keep a small cast on the page: the user and browser, the app, the auth server, and any API that later receives the token. Label the redirects people trip on, and mark the hop where a code becomes a token so nobody mistakes it for another browser bounce.
Support words such as redirect, consent and token earn a place when they name a real hop. The page does not need every query parameter from the RFCs. It needs enough structure that a teammate can point at a box and ask a clear question.
Above is a sample login sequence drawn for this article rather than a production path of mine. Four lifelines sit across the top: User+browser, App, Auth server and API. The numbered happy path is 1 start login, 2 redirect to auth, 3 consent screen, 4 user consents, 5 redirect back with code, 6 code to token on the back channel, and 7 call API with token. A callout on step 5 is labelled "where people get lost". The legend marks solid arrows as the back channel and dashed arrows as browser redirects.
Why the picture beats another walkthrough
Explaining OAuth login with a diagram gives the room a shared place to point. In my view, that beats another prose walkthrough when the confusion is about order and channel, not about a missing RFC citation.
A still sequence also makes consent and redirect visible as separate hops. Readers who only remember "then the user logs in" often skip the bounce back with a code, which is exactly where reviews stall. Putting that bounce on the page turns a vague stuck feeling into a labelled step.
The picture is not a security proof. It is a map of the path you intend to run, so a reviewer can ask whether a secret crosses the wrong channel before the feature ships.
Numbering the hops also keeps consent separate from the redirect that returns a code. Teams that collapse those into one spoken step often discover, mid-review, that two people meant two different boxes. A labelled sequence makes that mismatch visible before anyone argues about implementation detail.
How I draw and share it
A labelled still image is usually enough, saved as PNG or SVG next to the auth documentation or attached to the pull request that changes the login.
Inside ByteDiagram the matching controls are easy to find. The Icons panel holds built-in icons, AWS Services among them. A "Section" whose label reads "Dashed zone for grouping steps" can separate a front-channel group from a back-channel group. The Templates panel seeds a layout; the "Auto-arrange" control lines boxes up after edits.
When the login path is clear, its Export menu includes PNG, SVG and Animated GIF (checked 29 Oct 2026). A still is usually enough for login reviews; animation helps when order itself is the confusion. For a wider look at sequence diagram tools built for request and response order, that comparison post stays the roundup.
Some IdP consoles render a vendor-shaped graph of their hosted flow. Those consoles sit outside this review and were not tested by us. A product-specific page records the actors and hops your team agrees to explain, independent of any one vendor screen.
Before the next review, sketch the login path your teammates keep asking about in the guest canvas. Guest editing there stays available without an account.
What this diagram is not
In my view, the login map is not a substitute for the RFCs, not a threat model, and not every OAuth grant type on one canvas. It will not issue tokens and it will not choose an identity provider for you. Its job is narrower: keep the login path honest so nobody gets lost in the middle hops.
When the question is how a sequence view relates to other modelling styles, see where a sequence view sits among the other UML diagram types. Keep that reference beside the login map rather than merging every UML view into the same picture.
Keeping the login map out of the threat-model job also keeps reviews shorter. One page answers whether people can follow the sign-in path; another answers how the feature can be abused. Mixing them usually hides a lost hop or an open abuse path under the wrong heading.
A clear redirect legend also helps onboarding. New teammates can learn which hops the browser sees before they read a single line of protocol text. That saves a repeated hallway explanation of the same bounce.
FAQ
What should an OAuth login flow diagram show?
In my view, it should show the actors, the redirects people trip on, and where any secret stays. It does not need every RFC parameter. The goal is a page a reviewer can follow without getting stuck on a prose walkthrough of the same hops.
Is an OAuth login flow diagram the same as a PKCE sequence diagram?
No. A login-flow picture for reviewers can stay simpler and focus on the path people get lost on. The site's PKCE sequence post remains the technical reference for the full grant details whenever you need that deeper walkthrough of the flow.
Should I animate the OAuth login steps?
Most login reviews are fine with a still page. Reach for Timeline controls or an Animated GIF only when the order of hops is the thing people keep mixing up. A labelled still usually stays easier to annotate in a pull request.
Sources
Checked on 29 October 2026.
- About ByteDiagram: what the product says about itself.
- ByteDiagram team: title and profile for Rahish.
- ByteDiagram guest canvas: Icons panel, Section shape, Templates, Auto-arrange, Export menu.
- OAuth 2.0 overview: authorization framework and grant types for different clients.
Draw the login path before the next review
Pick the OAuth login your team explains most often. Put the actors on one page, number the hops in order, mark the redirect that usually confuses people, and open the picture in the next review. Ask whether everyone can point to where the secret stays.
Draw the login path before the next review
ByteDiagram is our own tool. Lay out the actors, mark browser redirects apart from the back channel, and export a still image for the review thread.
Visit ByteDiagram