GitHub OAuth
Learn how to configure GitHub OAuth.
Set Up GitHub OAuth
Developer Settings
Go to GitHub and login.
Click your profile icon → Settings.
For an organization-owned application:
Click your profile icon → Your organizations → Settings (of the organization).
Next, click Developer settings (at the bottom of the left sidebar).
Create a new OAuth App
Select OAuth Apps and click New OAuth App.
Fill in the application name and homepage URL.
- Application name: Your application name
- Homepage URL:
http://localhost:3000(or your production URL)
Add authorization callback URL:
http://localhost:3000/api/auth/callback/githubFor production:
https://your-domain.com/api/auth/callback/githubClick Register application.
Update the environment variables
Copy the Client ID and paste it beside GITHUB_CLIENT_ID in the .env file.
Create a new client secret, copy it and paste it beside GITHUB_CLIENT_SECRET in the .env file.
GITHUB_CLIENT_ID=your-github-client-id
GITHUB_CLIENT_SECRET=your-github-client-secretTest the integration
Restart the server and go to http://localhost:3000/signin.
Click Sign in with GitHub.