Skip to content

GitHub OAuth Setup

This page explains how to configure GitHub OAuth for SaasForgeKit.

Required environment variables

Set in .env:

env
GITHUB_CLIENT_ID=
GITHUB_CLIENT_SECRET=
GITHUB_REDIRECT_URI="${APP_URL}/auth/github/callback"

Where to get GitHub keys

In GitHub:

  1. Go to Settings -> Developer settings -> OAuth Apps
  2. Create a new OAuth App
  3. Set Authorization callback URL:
text
https://your-domain.com/auth/github/callback
  1. Copy Client ID and generate/copy Client Secret into .env

Redirect URI notes

  • Callback URL must match your app URL and callback path exactly
  • For local development, use your local callback URL

Enable in admin

After env values are set and app cache is refreshed, enable GitHub in:

text
Admin -> Settings -> Social Auth