Software Engineering
OAuth2 Login Flow
Sequence diagram with token exchange, MFA, refresh rotation, and error states
AI Prompt
“Create a sequence diagram for a user login flow with OAuth2 PKCE: browser → frontend → auth server → resource API. Include token exchange, access token validation, refresh token rotation, and what happens when the refresh token is expired.”
Try this in AIDrawIO
Free — no credit card required
Refine it with follow-up prompts
After generating the base diagram, use these prompts to iterate and add detail — the same way a real architect would refine a whiteboard sketch.
- 1
“Add a parallel MFA path showing the TOTP challenge”
Try this follow-up - 2
“Show the error path where the access token is rejected”
Try this follow-up - 3
“Condense into swim lanes: User, Frontend, Auth Server, API”
Try this follow-up
How AIDrawIO generates this diagram
- 1.You paste the prompt above into the chat input.
- 2.AIDrawIO sends it to your chosen AI model (GPT-5, Claude, or Gemini).
- 3.The model returns draw.io-compatible XML — rendered instantly in the canvas.
- 4.Export as SVG, PNG, or XML. Edit any element manually or with follow-up prompts.