Prerequisites
Create a GitHub account.
Create OAuth App
- Go to GitHub Developer Settings.
- Click New OAuth App.
- Fill in the form:
- Application Name: Your App Name
- Homepage URL:
http://localhost:3000 - Authorization callback URL:
http://localhost:3000/api/auth/callback/github
- Click Register application.
- Generate a new Client Secret.
- Copy the Client ID and Client Secret.
- Add them to your
.envfile:
AUTH_GITHUB_CLIENT_ID=your_client_id
AUTH_GITHUB_CLIENT_SECRET=your_client_secret
Note: For production, create a separate OAuth App with your production URLs.
Related resources
Refer to GitHub's API documentation for more information about the service.
