- Create an OAuth app on GitHub (Note that a separate app must be created for production use)
- Go to Developer Settings
- Click on New OAuth App
- For Callback URL, enter
http://localhost:3000/api/auth/callback/github
- Once the app is created, click Generate a new client secret
- Set environment variables in
.env
- Set
AUTH_PROVIDER
togithub
- Set
GITHUB_ID
to the Client ID value - Set
GITHUB_SECRET
to the secret value generated above - Set
GITHUB_ALLOWED_ORG
to the GitHub organization name your Beam members must belong to - Set
NEXTAUTH_SECRET
to a random secret. This is a good resource.
- Set
GITHUB_ALLOWED_ORG
on the GitHub authorization screen. Failure to provide access to the organization will result in an "Access Denied" error screen with the message "You do not have permission to sign in."