Prerequisites
- A GitHub account
- SnackBase installed and running
Step 1: Register a New OAuth Application
- Go to your GitHub account Settings
- Navigate to Developer settings > OAuth Apps
- Click New OAuth App
- Fill in the application details:
- Application name: SnackBase
- Homepage URL:
https://<your-domain> - Authorization callback URL:
https://<your-domain>/api/v1/auth/oauth/github/callback- For local development:
http://localhost:8000/api/v1/auth/oauth/github/callback
- For local development:
Step 2: Generate Client Secret
- After creating the app, you will see the Client ID
- Click Generate a new client secret
- Copy the Client Secret
Step 3: Configure SnackBase
In SnackBase, configure the GitHub provider:Testing
- Save your configuration
- Attempt to sign in via the GitHub button on the login page
Troubleshooting
Common Issues:- redirect_uri_mismatch: Ensure the callback URL exactly matches what you configured
- Application suspended: GitHub may suspend apps that violate their terms of service
Related Guides
- OAuth Overview - Understanding the OAuth flow
- Google OAuth Setup
- Microsoft OAuth Setup