oauth-user-authentication

Implement GitHub App OAuth flows for user authentication.

3|3|Updated Jan 4, 2026
One-click install
npx skills add https://github.com/adaptive-enforcement-lab/claude-skills --skill oauth-user-authentication
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: oauth-user-authentication
Source: https://github.com/adaptive-enforcement-lab/claude-skills/tree/main/plugins/patterns/skills/oauth-user-authentication
Command: npx skills add https://github.com/adaptive-enforcement-lab/claude-skills --skill oauth-user-authentication

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires flask, requests, and includes scripts (resource) components.

What problem does it solve?

OAuth flows enable GitHub Apps to act on behalf of users, preserving user identity in audit logs and enforcing per-user permissions.

Core Features & Use Cases

  • Web Application Flow and Device Flow for user authentication
  • Token exchange, per-user permissions, and audit-friendly attribution
  • Practical examples including Python scripts and a Flask-based web app to demonstrate end-to-end flows

Quick Start

Execute the web app example (scripts/example-6.py) to authenticate a GitHub user and perform a sample action on their behalf.

Frequently Asked Questions about oauth-user-authentication

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I authenticate GitHub App users via OAuth in a Python web app?

To authenticate GitHub App users via OAuth in a Python web app, implement the web application flow using Flask to handle token exchange and secure storage. This preserves user identity in audit logs and enforces per-user permissions.

What is the device flow for GitHub Apps and when is it needed?

The device flow for GitHub Apps is an OAuth mechanism that authenticates users on CLI tools or devices without a web browser. It is needed when you require user attribution and per-user permissions in headless environments.

Can I use Flask to manage OAuth token storage for GitHub Apps?

Yes, you can use Flask to manage OAuth token storage for GitHub Apps. The Skill provides a Flask-based web app example demonstrating end-to-end token exchange and secure storage patterns for user-context authentication.

What's the best way to authorize actions as users instead of an app on GitHub?

The best way to authorize actions as users is implementing OAuth flows for GitHub Apps. This approach ensures actions are attributed to specific users in audit logs while maintaining strict per-user permission boundaries.

Do I need user-context tokens for a GitHub App CLI tool?

Yes, you need user-context tokens for a GitHub App CLI tool to accurately attribute actions to the executing user. The device flow mechanism handles this authentication for CLI environments without a web browser.