How to Get Github Auth Keys
Step-by-Step Guide
- Go to your GitHub Settings.
- In the left sidebar, scroll down and click on Developer settings.
- Under Developer settings, select OAuth Apps and click New OAuth App to create a new OAuth application.
- If it’s your first time, you’ll see a “Register a new application” option. If not, click on New OAuth App.
- Fill out the "Register a new OAuth application" form:
- For Homepage URL, enter
http://localhost:3000
(for development). - For Authorization callback URL, set it to
http://localhost:3000/api/auth/callback/github
.
- For Homepage URL, enter
- Once you complete the registration, you’ll receive your Client ID and Client Secret.
Add these credentials to your .env
file:
GITHUB_CLIENT_ID=your-github-client-id
GITHUB_CLIENT_SECRET=your-github-client-secret