All guides

Add “Sign in with GitHub”

Let users sign in with their GitHub account. Built into your app’s auth (GoTrue), free on every plan — no server code.

1. Before you start

You need a GitHub account. Social sign-in is free on all plans and needs no server code.

2. Create the OAuth app

  1. Open Settings → Developer settings → OAuth Apps → New OAuth App.
  2. Set the Authorization callback URL to your project’s redirect URI: as soon as your agent declares the sign-in keys, it appears in Manage › Integrations, in the GitHub window (“Return address to paste in the GitHub console”), with a “Copy” button. It ends in /auth/v1/callback and never changes.
  3. Register the app, then generate a client secret.
  4. Copy the Client ID and the client secret.

3. Paste the values (exact names)

Declare these four keys in the panel, exactly as written (no VITE_ prefix):

  1. GOTRUE_EXTERNAL_GITHUB_ENABLED = true
  2. GOTRUE_EXTERNAL_GITHUB_CLIENT_ID = your client ID
  3. GOTRUE_EXTERNAL_GITHUB_SECRET = your client secret (_SECRET, not _CLIENT_SECRET)
  4. GOTRUE_EXTERNAL_GITHUB_REDIRECT_URI = the same redirect URI, copied from Manage › Integrations

All four are required; without _ENABLED = true the provider is silently ignored.

4. Common problems

The redirect after login fails: the callback URL in GitHub does not match your project’s callback — copy it again from Manage › Integrations.

The GitHub button does nothing: _ENABLED is missing or not true.

A GitHub OAuth App allows a single callback URL — use a separate app per environment if you need several.

5. For developers

© 2026 OmniLab — Makasi.TermsPrivacyLegal noticemakasi.dev