GitHub OAuth Nango Integration
AgentWorkforce/relay
A skill your agent uses when implementing GitHub OAuth + GitHub App authentication with Nango - provides two-connection pattern for user login and repo access with webhook handling
A skill your agent uses when configuring OAuth providers (Google/GitHub/Apple/X/etc.), setting up post-login auth hooks, tuning JWT lifetimes, or generating service API keys
$ npx skills add butterbase-ai/butterbase-skills --skill auth-setup -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install butterbase-ai/butterbase-skills auth-setup --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/butterbase-ai/butterbase-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/auth-setup .claude/skills/auth-setup && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "auth-setup" agent skill from https://github.com/butterbase-ai/butterbase-skills/tree/main/skills/auth-setup into .claude/skills/auth-setup/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "auth-setup", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/butterbase-ai/butterbase-skills/tree/main/skills/auth-setupType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add butterbase-ai/butterbase-skills --skill auth-setup -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install butterbase-ai/butterbase-skills auth-setup --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/butterbase-ai/butterbase-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/auth-setup .agents/skills/auth-setup && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "auth-setup" agent skill from https://github.com/butterbase-ai/butterbase-skills/tree/main/skills/auth-setup into .agents/skills/auth-setup/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "auth-setup", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add butterbase-ai/butterbase-skills --skill auth-setup -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install butterbase-ai/butterbase-skills auth-setup --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/butterbase-ai/butterbase-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/auth-setup .cursor/skills/auth-setup && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "auth-setup" agent skill from https://github.com/butterbase-ai/butterbase-skills/tree/main/skills/auth-setup into .cursor/skills/auth-setup/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "auth-setup", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/butterbase-ai/butterbase-skills.git --path skills/auth-setup--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add butterbase-ai/butterbase-skills --skill auth-setup -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install butterbase-ai/butterbase-skills auth-setup --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/butterbase-ai/butterbase-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/auth-setup .gemini/skills/auth-setup && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "auth-setup" agent skill from https://github.com/butterbase-ai/butterbase-skills/tree/main/skills/auth-setup into .gemini/skills/auth-setup/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "auth-setup", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install butterbase-ai/butterbase-skills auth-setupInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add butterbase-ai/butterbase-skills --skill auth-setup -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/butterbase-ai/butterbase-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/auth-setup .github/skills/auth-setup && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "auth-setup" agent skill from https://github.com/butterbase-ai/butterbase-skills/tree/main/skills/auth-setup into .github/skills/auth-setup/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "auth-setup", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add butterbase-ai/butterbase-skills --skill auth-setup -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install butterbase-ai/butterbase-skills auth-setup --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/butterbase-ai/butterbase-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/auth-setup .opencode/skills/auth-setup && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "auth-setup" agent skill from https://github.com/butterbase-ai/butterbase-skills/tree/main/skills/auth-setup into .opencode/skills/auth-setup/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "auth-setup", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
auth-setupA skill your agent uses when configuring OAuth providers (Google/GitHub/Apple/X/etc.), setting up post-login auth hooks, tuning JWT lifetimes, or generating service API keys
Auth Setup is an agent skill from butterbase-ai/butterbase-skills. Use when configuring OAuth providers (Google/GitHub/Apple/X/etc.), setting up post-login auth hooks, tuning JWT lifetimes, or generating service API keys
Its SKILL.md is about 2.2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Backend & APIs, covering Authentication and OAuth and OpenID Connect. It works with GitHub. The repository describes itself as: Plugin for Butterbase.ai. The licence is MIT.
7 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit aa8ae69. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are javascript, typescript and json).
From the folder's file list and the shell code blocks in SKILL.md.
Hosts in commands or code, which the agent is likely to contact:
api.butterbase.aiFrom URLs in SKILL.md, links to its own repository left out.
Names these keys or tokens, usually read from environment variables:
RESEND_API_KEYFrom names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Auth Setup loads about 2.2k tokens when it runs. Until then it costs about 41 tokens; SKILL.md has 678 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from butterbase-ai/butterbase-skills at commit aa8ae69, republished under its MIT licence (© butterbase-ai). 678 words, ~2,155 tokens.
.claude/skills/auth-setup/SKILL.md (or your agent's skills folder).Two umbrella tools cover end-user authentication:
manage_oauth — provider configuration (Google, GitHub, Apple, X, custom)manage_auth_config — auth hooks, JWT lifetimes, service key generationFor broad app build-out, see also butterbase-skills:build-app. This skill is the deep dive.
Every request runs under one of three database roles:
| Auth header | Role | current_user_id() | RLS |
|---|---|---|---|
| none | butterbase_anon | NULL | enforced; default deny |
End-user JWT (issued by manage_oauth or email login) | butterbase_user | user UUID | enforced |
Service key (bb_sk_*) | butterbase_service | NULL | bypassed |
Auth is what transforms a request into the right role. RLS is what filters the data. Both must be configured.
manage_oauth({
app_id: "app_abc123",
action: "configure",
provider: "google",
client_id: "123456789.apps.googleusercontent.com",
client_secret: "GOCSPX-...",
redirect_uris: ["https://api.butterbase.ai/auth/app_abc123/oauth/google/callback"]
// scopes / authorization_url / token_url / userinfo_url / provider_metadata are auto-filled for built-in providers
})Built-in providers (URLs and scopes pre-filled): google, github, discord, facebook, linkedin, microsoft, apple, x.
Custom providers: pass authorization_url, token_url, userinfo_url, and scopes explicitly.
https://api.butterbase.ai/auth/{app_id}/oauth/{provider}/callbackRegister this exact URI in the provider's developer console. Mismatch is the most common reason OAuth flows fail.
| Provider | Quirk |
|---|---|
apple | Requires provider_metadata: { teamId, keyId, privateKey }. Apple only returns the user's name on first auth and uses POST callback (handled automatically). |
x | Does not return email. Butterbase synthesises {username}@users.noreply.x.local for the user record. |
facebook | Default scopes email, public_profile. |
google | Standard. |
github | Standard. |
manage_oauth({ app_id, action: "get" }) // list all providers (secrets redacted)
manage_oauth({ app_id, action: "get", provider: "google" }) // single provider
manage_oauth({ app_id, action: "update", provider: "google", client_secret: "new-secret" })
manage_oauth({ app_id, action: "delete", provider: "google" }) // disables future logins; existing sessions valid until expiryGET https://api.butterbase.ai/auth/{app_id}/oauth/{provider}?redirect_to=https://yourapp.com/auth/callbackUser signs in at the provider, gets bounced back to redirect_to with access_token and refresh_token as query params. The Butterbase SDK wraps this:
await client.auth.signInWithOAuth({ provider: "google" });
const { user, accessToken } = await client.auth.getSession();manage_auth_config({
app_id: "app_abc123",
action: "update_jwt",
accessTokenTtl: "15m", // formats: "15m", "1h", "2h", "1d"
refreshTokenTtlDays: 30 // integer days
})Defaults: 15-minute access tokens, 7-day refresh tokens.
| Use case | accessTokenTtl | refreshTokenTtlDays |
|---|---|---|
| High-security (banking, admin) | 5m–15m | 1–7 |
| Standard SaaS | 15m (default) | 30 |
| Low-friction consumer apps | 1h | 90 |
Important: changes apply only to new tokens. Active tokens keep their original expiration — there is no global revoke. Treat TTL changes as forward-looking only.
A post-auth function is a deployed Butterbase function invoked fire-and-forget after every successful auth event (OAuth login, email login, email signup).
// 1. Deploy the function first (see butterbase-skills:function-dev)
deploy_function({
app_id: "app_abc123",
name: "after-auth",
code: postAuthHandlerCode,
trigger: { type: "http", config: { auth: "none" } }
})
// 2. Register it as the auth hook
manage_auth_config({
app_id: "app_abc123",
action: "configure_auth_hook",
post_auth_function: "after-auth"
})
// To remove the hook later: pass post_auth_function: nullThe function must already exist when you configure the hook.
The function receives a POST with this body:
{
"event": "oauth_login | login | signup",
"user": {
"id": "uuid",
"email": "...",
"provider": "google | github | email | ...",
"display_name": "...",
"avatar_url": "..."
},
"isNewUser": true,
"provider": "google"
}The function runs as butterbase_service (RLS bypassed, ctx.user is null). Use body.user.id to know who just logged in.
// after-auth/index.ts
export async function handler(req, ctx) {
const { user, isNewUser, event } = await req.json();
if (isNewUser) {
// 1. Create profile row
await ctx.db.query(
"INSERT INTO profiles (user_id, display_name) VALUES ($1, $2) ON CONFLICT DO NOTHING",
[user.id, user.display_name]
);
// 2. Send welcome email (via env-stored API key)
ctx.waitUntil(sendWelcomeEmail(ctx.env.RESEND_API_KEY, user.email));
}
// 3. Audit log on every login
await ctx.db.query(
"INSERT INTO login_log (user_id, event, provider) VALUES ($1, $2, $3)",
[user.id, event, ctx.user ?? null]
);
return new Response("ok", { status: 200 });
}Auth hooks are fire-and-forget. Don't return data the user needs — they won't see it. Use them for side effects only.
bb_sk_*)Service keys grant full access to all your apps and bypass RLS. Treat them like passwords.
manage_auth_config({
action: "generate_service_key",
name: "CI/CD pipeline"
})
// → { key: "bb_sk_a1b2c3...", key_id, prefix, name, created_at }The full key is returned once. Store it immediately in your secret manager — you cannot retrieve it again. If you lose it, generate a new one and revoke the old.
manage_api_keys({ action: "list" })
manage_api_keys({ action: "revoke", key_id: "uuid-..." })list returns metadata only (prefix, name, last_used_at), never the secret. revoke is immediate and irreversible.
manage_auth_config (generate_service_key) — create the new key.manage_app list).manage_api_keys (revoke) — kill the old key.Do steps 1–3 before step 4 to avoid downtime.
| Don't | Do |
|---|---|
Hardcode bb_sk_* keys in client code or commit them to git | Store in env vars / secret manager |
| Reuse one OAuth app between dev, staging, prod | Separate OAuth apps per environment, with their own redirect URIs |
| Use a service key from frontend code "for convenience" | Frontends use end-user JWTs; service keys are server-only |
Increase accessTokenTtl to "fix" frequent re-auth | Use the refresh token; SDK handles this automatically |
Forget that manage_oauth delete only stops new logins | Existing sessions remain valid until they expire — rotate JWT keys via support if you need a hard kill |
| Put critical logic in the auth hook | Hooks are fire-and-forget. Errors don't surface to the user. Keep them to side effects. |
| Log the full service key in audit / debug output | Log only the prefix (bb_sk_a1b2c3) — secrets must never appear in logs |
| Task | Tool |
|---|---|
| Add Google OAuth | manage_oauth (configure) |
| List OAuth providers | manage_oauth (get) |
| Set post-login hook | manage_auth_config (configure_auth_hook) |
| Change JWT lifetimes | manage_auth_config (update_jwt) |
| Create service key | manage_auth_config (generate_service_key) |
| List service keys | manage_api_keys (list) |
| Revoke service key | manage_api_keys (revoke) |
If a docs/butterbase/00-state.md exists in the working directory, prefer invoking via /butterbase-skills:journey-auth so the journey orchestrator stays in sync.
© butterbase-ai, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in skills/auth-setup of butterbase-ai/butterbase-skills.
Open the folder on GitHubat commit aa8ae69
Auth Setup next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Auth Setup this skillbutterbase-ai/butterbase-skills | 534 | — | ~2.2k | Automated safety check: Pass | MIT | |
| GitHub OAuth Nango IntegrationAgentWorkforce/relay | 866 | 1 repos | ~3.4k | Automated safety check: Pass | Apache-2.0 | |
| Atmos Authcloudposse/atmos | 1.4k | — | ~4.2k | Automated safety check: Pass | Apache-2.0 | |
| Nuxt Studiosecondsky/claude-skills | 227 | — | ~2.8k | Automated safety check: Pass | MIT | |
| OAuthhashgraph-online/awesome-codex-plugins | 1.2k | — | ~1.1k | Automated safety check: Pass | Apache-2.0 | |
| Authaiskillstore/marketplace | 430 | — | ~1.6k | Automated safety check: Pass | None |
AgentWorkforce/relay
A skill your agent uses when implementing GitHub OAuth + GitHub App authentication with Nango - provides two-connection pattern for user login and repo access with webhook handling
cloudposse/atmos
Authentication and identity management: providers (SSO/SAML/OIDC/GCP/Atmos Pro), identities, keyring, identity chaining, login/exec/shell/console, and github/sts for private GitHub access
secondsky/claude-skills
This skill should be used when the user asks to "set up Nuxt Studio", "configure Studio OAuth", "deploy Studio to Cloudflare", "add visual editor to Nuxt", "configure studio.domain.com subdomain"…
hashgraph-online/awesome-codex-plugins
A skill your agent uses when a val needs to require login with a Val Town account — gating routes behind authentication, identifying the current user, building user-specific dashboards.
aiskillstore/marketplace
Authentication and access control skill for Next.js 15 + Supabase applications.
grafana/skills
Manage Grafana Cloud accounts — organizations, stacks, RBAC roles and assignments, SSO/SAML/OAuth/GitHub auth, service accounts for CI/CD, user invites, team membership, and API-driven provisioning.
butterbase-ai/butterbase-skills
A skill your agent uses when calling the app's AI gateway from agent tools — chat completions, embeddings, listing models, configuring defaults or BYOK, reading token/cost usage
butterbase-ai/butterbase-skills
A skill your agent uses when building a new Butterbase app from scratch, creating a full-stack application, or when the user asks to set up a complete backend with database, auth, and deployment
butterbase-ai/butterbase-skills
A skill your agent uses when contributing to the Butterbase codebase, adding new MCP tools, creating API routes, writing migrations, or understanding the monorepo architecture
butterbase-ai/butterbase-skills
A skill your agent uses when users report access denied errors, see wrong data, RLS policies are not working, or when troubleshooting Row-Level Security issues in Butterbase
butterbase-ai/butterbase-skills
A skill your agent uses when deploying a frontend (React, Next.js, or static HTML) to a live URL on Butterbase, or when troubleshooting deployment issues like MIME type errors or blank pages
butterbase-ai/butterbase-skills
A skill your agent uses when building stateful per-key actors — chat rooms, multiplayer rooms, rate limiters, long-running agents, leaderboards — that need persistent in-memory + storage state…
Works with
Categories
A skill your agent uses when configuring OAuth providers (Google/GitHub/Apple/X/etc.), setting up post-login auth hooks, tuning JWT lifetimes, or generating service API keys. Auth Setup is an agent skill from butterbase-ai/butterbase-skills.
Auth Setup fits situations like: configuring OAuth providers (Google/GitHub/Apple/X/etc.); setting up post-login auth hooks; tuning JWT lifetimes; generating service API keys.
Run `npx skills add butterbase-ai/butterbase-skills --skill auth-setup -a claude-code`. Or copy the skill folder (skills/auth-setup in butterbase-ai/butterbase-skills) into .claude/skills/auth-setup in your project. Claude Code loads it when a task matches its description.
Run `npx skills add butterbase-ai/butterbase-skills --skill auth-setup -a codex`. Or copy the skill folder (skills/auth-setup in butterbase-ai/butterbase-skills) into .agents/skills/auth-setup in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add butterbase-ai/butterbase-skills --skill auth-setup -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/auth-setup, .gemini/skills/auth-setup, .github/skills/auth-setup and .opencode/skills/auth-setup in your project.
Going by SKILL.md and its folder, Auth Setup needs credentials named RESEND_API_KEY. Our summary lists: A credential in RESEND_API_KEY.
SKILL.md names 1 domain. In commands or code: api.butterbase.ai; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Auth Setup is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.2k tokens (SKILL.md is roughly 8.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Auth Setup: GitHub OAuth Nango Integration (AgentWorkforce/relay, 866 stars), Atmos Auth (cloudposse/atmos, 1.4k stars), Nuxt Studio (secondsky/claude-skills, 227 stars) and OAuth (hashgraph-online/awesome-codex-plugins, 1.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
butterbase-ai (a GitHub organization) maintains it in butterbase-ai/butterbase-skills, which has 534 GitHub stars. The repository holds 39 skills in this directory. The repository was last updated on October 5, 2026.
Source: butterbase-ai/butterbase-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.