GitHub
Last updated Jan 13th, 2026
This guide explains how to set up GitHub as an authentication provider with Stack Auth. GitHub allows users to sign in to your Stack Auth-enabled app using their GitHub account.
For Development purposes, Stack Auth uses shared keys for this provider. Shared keys are automatically created by Stack, but show Stack's logo on the OAuth sign-in page. You should replace these before you go into production.
Integration Steps
If you are unsure if you need to create a GitHub App, or a GitHub OAuth App, check the Differences On GitHub. More than likely, you will want to create a GitHub App. The installation process is the same for both.
Create a GitHub App
- Navigate to your GitHub Developer App Settings.
- Click the New GitHub App button.
- Enter a name for your application, homepage URL, and a description.
- For Authorization callback URL, add
https://api.stack-auth.com/api/v1/auth/oauth/callback/github - For permissions, at a minimum, you will need Account Permissions > Email Addresses set to Read Only. Your sign-in flow will not work without this permission.
- Select Any Account under the Where can this GitHub App be installed section.
- Click Create GitHub App
- Save the Client ID and click Generate a new client secret to create your Client Secret.
Enable GitHub Provider in Stack Auth
- On the Stack Auth dashboard, select Auth Methods in the left sidebar.
- Click Add SSO Providers and select GitHub as the provider.
- Set the Client ID and Client Secret you obtained from your GitHub App earlier.
GitHub OAuth App installation
Create an OAuth App
- Navigate to your GitHub Developer Settings.
- Click the New OAuth App button.
- Enter a name for your application, homepage URL, and a description.
- For Authorization callback URL, add
https://api.stack-auth.com/api/v1/auth/oauth/callback/github - Click Register application
- Save the Client ID and click Generate a new client secret to create your Client Secret.
Enable GitHub OAuth in Stack Auth
- On the Stack Auth dashboard, select Auth Methods in the left sidebar.
- Click Add SSO Providers and select GitHub as the provider.
- Set the Client ID and Client Secret you obtained from GitHub earlier.
Need More Help?
- Check the GitHub OAuth Documentation
- Join our Discord