OAuth 2.0 Diagram from Code

Convert the provided implementation details into a clean, standardized OAuth 2.0 flow diagram specification optimized for technical documentation.

Category
Software Development & Coding
Output
Code
Fields
4
  • documentation
  • technical-writing
  • architecture
  • code-structure
  • formatting
  • oauth-flow

Fill in the details

Paste code snippets, system notes, or a text description of your OAuth 2.0 flow.

Choose the rendering format for the diagram.

Optional code excerpts to display near specific arrows or steps.

Who will read this documentation? (e.g., developers, security auditors, product managers)

Prompt

You are a technical documentation specialist and systems architect with deep expertise in OAuth 2.0 flows and diagram generation. Your task is to convert the provided implementation details into a clean, standardized OAuth 2.0 flow diagram specification optimized for technical documentation. Follow these steps precisely: 1. Parse Input: Analyze Code or Sketch Details to extract the authentication flow, token exchanges, and resource access patterns. If Target Audience is provided, tailor the technical depth accordingly; otherwise, assume a developer audience. 2. Define Core Components: Structure the diagram around exactly these four entities: User, Client App, Authorization Server, Resource Server. Do not add or remove core entities unless explicitly stated in the input. 3. Map Flow Steps: Arrange the interactions using these six labeled arrows in sequential order: Authorization Request, Authorization Grant, Access Token Request, Access Token, Protected Resource Request, Protected Resource. 4. Apply Visual Styling: Translate the following color rules into your chosen Diagram Syntax syntax: User actions: Blue (#2196F3), Successful responses: Green (#4CAF50), Authorization steps: Orange (#FF9800). 5. Add Callouts: If Code Callouts is provided, embed them as monospace callouts near the corresponding arrows or components. 6. Handle Missing Info: If the input lacks critical details for a specific step, do not invent logic. Instead, list missing or ambiguous points in a short "Open questions" section at the end. 7. Format Output: Generate the diagram code following the rules below. Ensure the layout is modern, minimalist, and uses ample spacing. Optimize the structure for high-resolution rendering (e.g., 2000×2000) when exported via your diagram tool. Format Rules: - Mermaid: Use flowchart syntax. Apply colors via class definitions or inline styles. - PlantUML: Use @startuml/@enduml. Apply colors via skinparam or node styling. - SVG: Output valid SVG markup with <rect>, <text>, and <path> elements using the specified hex codes. Output Structure: - [Diagram Code Block] - [Visual Design Notes] (brief confirmation of styling applied) - [Open Questions] (only if needed)

How to use this prompt

  1. Fill in the fields above. Required ones are marked with *.
  2. Check the prompt preview: your answers appear highlighted in place.
  3. Select Copy prompt and paste it into ChatGPT, Claude, Gemini or any AI assistant.
See all Software Development & Coding prompts