OAuth flows for user-context operations. Web application patterns, device flow for CLI tools, and token refresh strategies for GitHub Apps.
Implements OAuth flows for GitHub Apps requiring user context. Triggers when building web apps or CLI tools needing user attribution, personal repo access, or individual permissions.
/plugin marketplace add adaptive-enforcement-lab/claude-skills/plugin install patterns@ael-skillsThis skill inherits all available tools. When active, it can use any tool Claude has access to.
examples.mdreference.mdscripts/example-1.mermaidscripts/example-2.mermaidscripts/example-3.pyscripts/example-4.pyscripts/example-5.pyscripts/example-6.pyOAuth authentication provides user-context access for GitHub Apps. It enables:
OAuth Limitations
- Not suitable for automated workflows (no user present)
- Requires user consent for each installation
- Rate limits apply per user (5,000/hour)
- More complex setup than installation tokens
See the full implementation guide in the source documentation.
flowchart TD
A["Need user context?"] --> B{"Who initiates<br/>the action?"}
B -->|"Human user<br/>(web app, CLI)"| C["Use OAuth"]
B -->|"Automated process<br/>(GitHub Actions)"| D["Use Installation Token"]
C --> C1["User attribution required"]
C --> C2["Personal repos access"]
C --> C3["User-level permissions"]
D --> D1["No user present"]
D --> D2["Organization repos"]
D --> D3["App-level permissions"]
%% Ghostty Hardcore Theme
style A fill:#515354,stroke:#ccccc7,stroke-width:2px,color:#ccccc7
style B fill:#fd971e,stroke:#e6db74,stroke-width:2px,color:#1b1d1e
style C fill:#a7e22e,stroke:#bded5f,stroke-width:2px,color:#1b1d1e
style D fill:#f92572,stroke:#ff669d,stroke-width:2px,color:#1b1d1e
style C1 fill:#515354,stroke:#ccccc7,stroke-width:1px,color:#ccccc7
style C2 fill:#515354,stroke:#ccccc7,stroke-width:1px,color:#ccccc7
style C3 fill:#515354,stroke:#ccccc7,stroke-width:1px,color:#ccccc7
style D1 fill:#515354,stroke:#ccccc7,stroke-width:1px,color:#ccccc7
style D2 fill:#515354,stroke:#ccccc7,stroke-width:1px,color:#ccccc7
style D3 fill:#515354,stroke:#ccccc7,stroke-width:1px,color:#ccccc7
See reference.md for additional techniques and detailed examples.
See examples.md for detailed code examples.
See examples.md for code examples.
See reference.md for complete documentation.