Skip to main content

GitHub configuration

Package: sanvex/github · Driver id: github

Auth modes

What to register (GitHub)

API key (simplest)

  1. GitHub → Settings → Developer settings → Personal access tokens.
  2. Create a token with scopes your app needs (repo, read:org, etc.).
  3. Store via CLI (see below) — no OAuth app required.

OAuth2 (multi-user or GitHub App flow in your app)

  1. GitHub → Settings → Developer settings → OAuth Apps (or GitHub Apps for app installations).
  2. Set Authorization callback URL to match GITHUB_REDIRECT_URI.
  3. Note Client ID and Client secret for .env.
This repo does not ship /sanvex/github/login routes — you implement the OAuth UI and store tokens.

Environment variables

PATs are not stored in .env long-term — use sanvex:setup or programmatic setApiKey().

config/sanvex.php (optional)

Not required for API key setup. Use only if you want OAuth app settings in published config for your own OAuth flow.

Stored credential keys (sv_accounts)

Token resolution: api_keybot_tokenaccess_token.

CLI

Built-in Sanvex OAuth routes

None.

What the driver reads at runtime

Next: Setup · Resources