oauth-integrations

Installation
Summary

OAuth 2.0 authentication for GitHub and Microsoft Entra in edge runtimes without MSAL.

  • Covers GitHub OAuth quirks: required User-Agent header, private email handling via /user/emails endpoint, and form-encoded token responses
  • Microsoft Entra setup for Cloudflare Workers using manual OAuth flow and JWT validation with jose, including tenant configuration and scope requirements
  • Token lifetime management: GitHub tokens don't expire, Microsoft access tokens last 60-90 minutes with optional refresh token flow via offline_access scope
  • Common pitfalls and error reference for both providers, including 403 resolution and scope misconfiguration fixes
SKILL.md

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.

Header Requirement
User-Agent REQUIRED - Returns 403 without it
Accept application/vnd.github+json recommended
const resp = await fetch('https://api.github.com/user', {
  headers: {
    Authorization: `Bearer ${accessToken}`,
Related skills
Installs
360
GitHub Stars
776
First Seen
Jan 20, 2026