KS
Killer-Skills

oauth-integrations — Categories.community

v1.0.0
GitHub

About this Skill

Ideal for Edge Environment Agents requiring seamless GitHub and Microsoft OAuth integrations. Simulations of the Ethical Riemann Hypothesis (ERH), which states that in a "healthy" moral judgment system, the error in predicting critical misjudgments grows at most like √x, where x is the complexity of the decision.

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

Quality Score

Top 5%
33
Excellent
Based on code quality & docs
Installation
SYS Universal Install (Auto-Detect)
Cursor IDE Windsurf IDE VS Code IDE
> npx killer-skills add dennislee928/Ethic-Latex

Agent Capability Analysis

The oauth-integrations MCP Server by dennislee928 is an open-source Categories.community integration for Claude and other AI agents, enabling seamless task automation and capability expansion.

Ideal Agent Persona

Ideal for Edge Environment Agents requiring seamless GitHub and Microsoft OAuth integrations.

Core Value

Empowers agents to authenticate with GitHub and Microsoft using OAuth protocols, enabling secure data exchange and leveraging libraries like Cloudflare Workers for edge runtime deployments, while adhering to strict requirements such as the `User-Agent` and `Accept` headers for GitHub API interactions.

Capabilities Granted for oauth-integrations MCP Server

Implementing GitHub OAuth for secure repository access
Authenticating Microsoft services using OAuth in edge environments
Developing Cloudflare Workers with integrated OAuth functionality

! Prerequisites & Limits

  • Requires specific headers for GitHub API requests, such as `User-Agent` and `Accept`
  • Limited to GitHub and Microsoft OAuth implementations
  • Dependent on Cloudflare Workers or similar edge runtimes for deployment
Project
SKILL.md
4.8 KB
.cursorrules
1.2 KB
package.json
240 B
Ready
UTF-8

# Tags

[No tags]
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

Related Skills

Looking for an alternative to oauth-integrations or building a Categories.community AI Agent? Explore these related open-source MCP Servers.

View All

widget-generator

Logo of f
f

widget-generator is an open-source AI agent skill for creating widget plugins that are injected into prompt feeds on prompts.chat. It supports two rendering modes: standard prompt widgets using default PromptCard styling and custom render widgets built as full React components.

149.6k
0
Design

chat-sdk

Logo of lobehub
lobehub

chat-sdk is a unified TypeScript SDK for building chat bots across multiple platforms, providing a single interface for deploying bot logic.

73.0k
0
Communication

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
Communication

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
Communication