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
- Open Settings → Developer settings → OAuth Apps → New OAuth App.
- 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.
- Register the app, then generate a client secret.
- 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):
- GOTRUE_EXTERNAL_GITHUB_ENABLED = true
- GOTRUE_EXTERNAL_GITHUB_CLIENT_ID = your client ID
- GOTRUE_EXTERNAL_GITHUB_SECRET = your client secret (_SECRET, not _CLIENT_SECRET)
- 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