Skip to main content
UptimeKit supports social login via GitHub and Discord. To enable these, you need to configure the respective environment variables in your .env file.

GitHub Authorization

To enable GitHub login, you need to create an OAuth App in GitHub.
A normal application will work, but it requires permission to access the user’s email.
  1. Go to Settings > Developer settings > OAuth Apps on GitHub.
  2. Click New OAuth App.
  3. Fill in the details:
    • Application Name: UptimeKit (or your preferred name)
    • Homepage URL: http://localhost:3000 (or your production URL)
    • Authorization callback URL: http://localhost:3000/api/auth/callback/github
  4. Register the application.
  5. Generate a Client Secret.
Add the Client ID and Client Secret to your .env file:
GITHUB_CLIENT_ID=your_github_client_id
GITHUB_CLIENT_SECRET=your_github_client_secret

Discord Authorization

To enable Discord login, create an application in the Discord Developer Portal.
  1. Go to the Discord Developer Portal.
  2. Click New Application.
  3. Go to the OAuth2 tab.
  4. Under Redirects, add: http://localhost:3000/api/auth/callback/discord
  5. Save changes.
  6. Copy the Client ID.
  7. Reset and copy the Client Secret.
Add the Client ID and Client Secret to your .env file:
DISCORD_CLIENT_ID=your_discord_client_id
DISCORD_CLIENT_SECRET=your_discord_client_secret

Summary of Configuration

Ensure your main .env file contains the relevant variables for the providers you wish to enable:
# GitHub (Optional)
GITHUB_CLIENT_ID=
GITHUB_CLIENT_SECRET=

# Discord (Optional)
DISCORD_CLIENT_ID=
DISCORD_CLIENT_SECRET=