github-oauth-nango-integration

Implements dual-connection GitHub OAuth and GitHub App authentication with Nango webhooks.

812|65|Updated Dec 17, 2025
One-click install
npx skills add https://github.com/AgentWorkforce/relay --skill github-oauth-nango-integration
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: github-oauth-nango-integration
Source: https://github.com/AgentWorkforce/relay/tree/main/.claude/skills/github-oauth-nango-integration
Command: npx skills add https://github.com/AgentWorkforce/relay --skill github-oauth-nango-integration

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

GitHub offers two separate authentication mechanisms—OAuth Apps for user identity and GitHub Apps for repository access—and reconciling them into one coherent login-plus-repo-access flow is error-prone. This Skill provides a proven two-connection pattern using Nango, including webhook handling, polling endpoints, and org-approval edge cases.

Core Features & Use Cases

  • Dual-Connection Pattern: Separates user login (github integration) from repository access (github-app-oauth integration), linked by user ID.
  • Webhook Handling: Verifies Nango webhook signatures with HMAC-SHA256 and routes auth and sync webhook types to the correct handlers.
  • Edge-Case Coverage: Handles returning users with temporary polling connections, duplicate connection cleanup, and pending organization admin approval (403 responses).
  • Use Case: You are building a SaaS app where users sign in with GitHub and then connect repositories for PR and commit syncing. Use this Skill to scaffold the session endpoints, webhook handlers, database schema, and frontend Nango Connect UI integration.

Quick Start

Ask the AI to implement GitHub login and repository connection using the Nango two-connection pattern from this Skill, including the auth webhook handler and polling status endpoints.

Frequently Asked Questions about github-oauth-nango-integration

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

FAQPage Schema
How do I implement GitHub OAuth login with Nango?

Create a Nango connect session restricted to the `github` integration, open the Nango Connect UI on the frontend, and handle the resulting auth webhook to create or update the user record. Poll a status endpoint with the connection ID to issue a JWT once the webhook completes.

What is the difference between GitHub OAuth App and GitHub App authentication?

A GitHub OAuth App provides user identity (profile, email, GitHub ID) but no repository access, while a GitHub App provides granular access to specific installed repositories but no user identity. Use both together, linked by user ID, to support login plus repo operations.

How do I verify Nango webhook signatures?

Compute an HMAC-SHA256 digest of the raw request body using your Nango secret key and compare it to the `X-Nango-Signature` header. Reject requests with mismatched signatures using a 401 response before parsing the payload.

Why does GitHub App installation fail with a 403 error?

A 403 during installation typically means the target organization requires admin approval for third-party apps. Handle this by setting a pending installation flag on the user record and returning a pendingApproval status so the frontend can inform the user.

How do I handle returning users with duplicate Nango connections?

Store the new connection ID in a temporary incoming connection field for polling, then delete the duplicate Nango connection after the user authenticates. Keep the original permanent connection ID on the user record for ongoing API access.