agentworkforce avatar

Github Oauth Nango Integration

If you're building GitHub OAuth where users log in *and* your app needs repo access, you'll hit the reconciliation problem: OAuth gives you identity but not repos, GitHub Apps give you repos but not identity. This skill shows the two-connection pattern using Nango to solve it. One OAuth flow stores the user profile with a permanent connection ID, another flow creates per-repo connections when they install your GitHub App, then you link them by user ID. Includes webhook handlers for both auth types, polling endpoints for the frontend, and the schema to tie it together. The pending installation request logic for org approvals is a nice touch most guides skip.

GitHub stars
719
last updated
Jun 11, 2026

Install

$ npx -y skills add agentworkforce/relay --skill github-oauth-nango-integration --agent claude-code

Installs into .claude/skills of the current project.

Files

GitHub OAuth + Nango Integration

Overview

Implements dual-connection OAuth pattern: one for user identity (github integration), another for repository access (github-app-oauth integration). This separation enables secure login while maintaining granular repo permissions through GitHub App installations.

When to Use

  • Setting up GitHub OAuth login via Nango
  • Implementing GitHub App installation webhooks
  • Reconciling OAuth users with GitHub App installations
  • Building apps that need both user auth and repo access
  • Handling Nango sync webhooks for GitHub data

Why Two Connections?

GitHub has two different authentication mechanisms that serve different purposes:

GitHub OAuth App (github integration)

  • What it is: Traditional OAuth for user identity
  • What it gives you: User profile (name, email, avatar, GitHub ID)
  • What it DOESN'T give you: Access to repositories
  • Use for: Login, "Sign in with GitHub"

GitHub App (github-app-oauth integration)

Sponsors

Details

Repository
github.com/agentworkforce/relay
Categories
Security, Git & Pull Requests
License
Apache-2.0
First seen
Jun 11, 2026

More from agentworkforce/relay

All 18

Recommended

More Security
1elastic avatarsecurity-alert-triageelastic/agent-skills>0skills.sh installs
2elastic avatarsecurity-case-managementelastic/agent-skills>0skills.sh installs
3elastic avatarsecurity-detection-rule-managementelastic/agent-skills>0skills.sh installs
4elastic avatarsecurity-generate-security-sample-dataelastic/agent-skills>0skills.sh installs
5elastic avatarcloud-network-securityelastic/agent-skills>0skills.sh installs
6hypnguyen1209 avatarcloud-securityhypnguyen1209/offensive-claudeCloud penetration testing — AWS/Azure/GCP privilege escalation, container escape, Kubernetes attacks, serverless exploitation, IaC misconfigurations0skills.sh installs