oauth-integrations — implementing GitHub OAuth in Cloudflare Workers oauth-integrations, Smart_Zone, community, implementing GitHub OAuth in Cloudflare Workers, ide skills, Microsoft OAuth in edge environments, oauth-integrations install, oauth-integrations for AI agents, edge environment authentication protocols, Claude Code, Cursor

v1.0.0
GitHub

About this Skill

Ideal for Edge Environment Agents requiring secure GitHub and Microsoft OAuth integrations oauth-integrations is a skill that implements OAuth authentication protocols for edge environments, supporting GitHub and Microsoft OAuth in Cloudflare Workers and other edge runtimes.

Features

Implements GitHub OAuth with required `User-Agent` header
Supports Microsoft OAuth in Cloudflare Workers
Uses `application/vnd.github+json` Accept header for GitHub API requests
Enables authentication in edge environments using OAuth protocols
Provides `fetch` API implementation for OAuth requests
Requires specific headers for GitHub API requests, such as `User-Agent` and `Accept`

# Core Topics

dennislee928 dennislee928
[0]
[0]
Updated: 3/8/2026

Agent Capability Analysis

The oauth-integrations skill by dennislee928 is an open-source community AI agent skill for Claude Code and other IDE workflows, helping agents execute tasks with better context, repeatability, and domain-specific guidance. Optimized for implementing GitHub OAuth in Cloudflare Workers, Microsoft OAuth in edge environments, oauth-integrations install.

Ideal Agent Persona

Ideal for Edge Environment Agents requiring secure GitHub and Microsoft OAuth integrations

Core Value

Empowers agents to implement secure authentication protocols using required headers like `User-Agent` and `Accept`, enabling seamless integration with GitHub and Microsoft APIs in edge environments such as Cloudflare Workers

Capabilities Granted for oauth-integrations

Implementing GitHub OAuth in Cloudflare Workers
Authenticating Microsoft APIs in edge runtimes
Securing API requests with required headers

! Prerequisites & Limits

  • Requires specific header configurations
  • Limited to GitHub and Microsoft OAuth providers
  • Edge environment compatibility required
Labs Demo

Browser Sandbox Environment

⚡️ Ready to unleash?

Experience this Agent in a zero-setup browser environment powered by WebContainers. No installation required.

Boot Container Sandbox

oauth-integrations

Install oauth-integrations, an AI agent skill for AI agent workflows and automation. Works with Claude Code, Cursor, and Windsurf with one-command setup.

SKILL.md
Readonly

OAuth Integrations for Edge Environments

Implement GitHub and Microsoft OAuth in Cloudflare Workers and other edge runtimes.

GitHub OAuth

Required Headers

GitHub API has strict requirements that differ from other providers.

HeaderRequirement
User-AgentREQUIRED - Returns 403 without it
Acceptapplication/vnd.github+json recommended
typescript
1const resp = await fetch('https://api.github.com/user', { 2 headers: { 3 Authorization: `Bearer ${accessToken}`, 4 'User-Agent': 'MyApp/1.0', // Required! 5 'Accept': 'application/vnd.github+json', 6 }, 7});

Private Email Handling

GitHub users can set email to private (/user returns email: null).

typescript
1if (!userData.email) { 2 const emails = await fetch('https://api.github.com/user/emails', { headers }) 3 .then(r => r.json()); 4 userData.email = emails.find(e => e.primary && e.verified)?.email; 5}

Requires user:email scope.

Token Exchange

Token exchange returns form-encoded by default. Add Accept header for JSON:

typescript
1const tokenResponse = await fetch('https://github.com/login/oauth/access_token', { 2 method: 'POST', 3 headers: { 4 'Content-Type': 'application/x-www-form-urlencoded', 5 'Accept': 'application/json', // Get JSON response 6 }, 7 body: new URLSearchParams({ code, client_id, client_secret, redirect_uri }), 8});

GitHub OAuth Notes

IssueSolution
Callback URLMust be EXACT - no wildcards, no subdirectory matching
Token exchange returns form-encodedAdd 'Accept': 'application/json' header
Tokens don't expireNo refresh flow needed, but revoked = full re-auth

Microsoft Entra (Azure AD) OAuth

Why MSAL Doesn't Work in Workers

MSAL.js depends on:

  • Browser APIs (localStorage, sessionStorage, DOM)
  • Node.js crypto module

Cloudflare's V8 isolate runtime has neither. Use manual OAuth instead:

  1. Manual OAuth URL construction
  2. Direct token exchange via fetch
  3. JWT validation with jose library

Required Scopes

typescript
1// For user identity (email, name, profile picture) 2const scope = 'openid email profile User.Read'; 3 4// For refresh tokens (long-lived sessions) 5const scope = 'openid email profile User.Read offline_access';

Critical: User.Read is required for Microsoft Graph /me endpoint. Without it, token exchange succeeds but user info fetch returns 403.

User Info Endpoint

typescript
1// Microsoft Graph /me endpoint 2const resp = await fetch('https://graph.microsoft.com/v1.0/me', { 3 headers: { Authorization: `Bearer ${accessToken}` }, 4}); 5 6// Email may be in different fields 7const email = data.mail || data.userPrincipalName;

Tenant Configuration

Tenant ValueWho Can Sign In
commonAny Microsoft account (personal + work)
organizationsWork/school accounts only
consumersPersonal Microsoft accounts only
{tenant-id}Specific organization only

Azure Portal Setup

  1. App Registration → New registration
  2. Platform: Web (not SPA) for server-side OAuth
  3. Redirect URIs: Add both /callback and /admin/callback
  4. Certificates & secrets → New client secret

Token Lifetimes

Token TypeDefault LifetimeNotes
Access token60-90 minutesConfigurable via token lifetime policies
Refresh token90 daysRevoked on password change
ID token60 minutesSame as access token

Best Practice: Always request offline_access scope and implement refresh token flow for sessions longer than 1 hour.

Common Corrections

If Claude suggests...Use instead...
GitHub fetch without User-AgentAdd 'User-Agent': 'AppName/1.0' (REQUIRED)
Using MSAL.js in WorkersManual OAuth + jose for JWT validation
Microsoft scope without User.ReadAdd User.Read scope
Fetching email from token claims onlyUse Graph /me endpoint

Error Reference

GitHub Errors

ErrorCauseFix
403 ForbiddenMissing User-Agent headerAdd User-Agent header
email: nullUser has private emailFetch /user/emails with user:email scope

Microsoft Errors

ErrorCauseFix
AADSTS50058Silent auth failedUse interactive flow
AADSTS700084Refresh token expiredRe-authenticate user
403 on Graph /meMissing User.Read scopeAdd User.Read to scopes

Reference

FAQ & Installation Steps

These questions and steps mirror the structured data on this page for better search understanding.

? Frequently Asked Questions

What is oauth-integrations?

Ideal for Edge Environment Agents requiring secure GitHub and Microsoft OAuth integrations oauth-integrations is a skill that implements OAuth authentication protocols for edge environments, supporting GitHub and Microsoft OAuth in Cloudflare Workers and other edge runtimes.

How do I install oauth-integrations?

Run the command: npx killer-skills add dennislee928/Smart_Zone. It works with Cursor, Windsurf, VS Code, Claude Code, and 19+ other IDEs.

What are the use cases for oauth-integrations?

Key use cases include: Implementing GitHub OAuth in Cloudflare Workers, Authenticating Microsoft APIs in edge runtimes, Securing API requests with required headers.

Which IDEs are compatible with oauth-integrations?

This skill is compatible with Cursor, Windsurf, VS Code, Trae, Claude Code, OpenClaw, Aider, Codex, OpenCode, Goose, Cline, Roo Code, Kiro, Augment Code, Continue, GitHub Copilot, Sourcegraph Cody, and Amazon Q Developer. Use the Killer-Skills CLI for universal one-command installation.

Are there any limitations for oauth-integrations?

Requires specific header configurations. Limited to GitHub and Microsoft OAuth providers. Edge environment compatibility required.

How To Install

  1. 1. Open your terminal

    Open the terminal or command line in your project directory.

  2. 2. Run the install command

    Run: npx killer-skills add dennislee928/Smart_Zone. The CLI will automatically detect your IDE or AI agent and configure the skill.

  3. 3. Start using the skill

    The skill is now active. Your AI agent can use oauth-integrations immediately in the current project.

Related Skills

Looking for an alternative to oauth-integrations or another community skill for your workflow? Explore these related open-source skills.

View All

widget-generator

Logo of f
f

f.k.a. Awesome ChatGPT Prompts. Share, discover, and collect prompts from the community. Free and open source — self-host for your organization with complete privacy.

149.6k
0
AI

flags

Logo of vercel
vercel

flags is a Next.js feature management skill that enables developers to efficiently add or modify framework feature flags, streamlining React application development.

138.4k
0
Browser

zustand

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
AI

data-fetching

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
AI