Configure GitHub Authentication
Configure a GitHub OAuth app so users can sign in to the Buzz dashboard. Buzz requests the read:user scope and stores its own 30-day session after GitHub confirms the user.
Before You Start
Section titled “Before You Start”You need:
- The public dashboard URL you intend to use, such as
https://buzz.example.com. - Permission to create an OAuth app in a GitHub account or organization.
- Access to the Buzz deployment’s secret environment variables.
Complete Configure DNS And TLS first so the OAuth app uses the intended public dashboard URL.
Create The OAuth App
Section titled “Create The OAuth App”-
In GitHub, open Settings > Developer settings > OAuth Apps.
-
Select New OAuth App. GitHub may show Register a new application when no OAuth apps exist yet.
-
Enter these values:
- Application name:
Buzz - Homepage URL:
https://buzz.example.com - Authorization callback URL:
https://buzz.example.com/dashboard/login/github/callback
- Application name:
-
Select Register application.
-
Copy the displayed Client ID.
-
Select Generate a new client secret, then copy the secret immediately.
Configure Buzz
Section titled “Configure Buzz”Set both values on the Buzz server:
GITHUB_CLIENT_ID=your-github-client-idGITHUB_CLIENT_SECRET=your-github-client-secretKeep the client secret out of source control and restrict access to the deployment environment.
Restart or redeploy Buzz after changing either variable. Buzz reads environment variables when the server process starts.
Verify Sign-In
Section titled “Verify Sign-In”-
Open
https://buzz.example.com. -
Start the GitHub sign-in.
-
Authorize the OAuth app on GitHub.
-
Confirm that GitHub returns you to the Buzz dashboard.
-
Configure the CLI’s server URL and run:
Terminal window buzz loginbuzz whoamibuzz loginopens Buzz in a browser for approval. Sign in through the dashboard if needed, enter the code shown by the CLI, then runbuzz whoamito confirm the GitHub account.
By default any GitHub user who can reach the server can sign in and deploy sites. Set BUZZ_ALLOW_REGISTRATION=false to stop new sign-ups, or BUZZ_ALLOWED_GITHUB_USERS to allow only specific GitHub usernames. Review Security before exposing Buzz to users you don’t administer.
Roll Back Authentication Changes
Section titled “Roll Back Authentication Changes”If sign-in fails after replacing an OAuth app or credential, restore the previous GITHUB_CLIENT_ID and GITHUB_CLIENT_SECRET, then restart or redeploy Buzz. Delete or revoke the unused OAuth app or client secret only after the previous configuration works again.