Self-Hosting
OAuth Setup
Configure GitHub and Google login for your self-hosted instance.
AnswerLoops uses OAuth for authentication. You need at least one provider.
GitHub OAuth
- Go to github.com/settings/developers → OAuth Apps → New OAuth App
- Fill in:
- Application name: AnswerLoops (or anything)
- Homepage URL:
http://localhost:3000(or your production URL) - Authorization callback URL:
http://localhost:3000/api/auth/callback/github
- Click Register application
- Copy the Client ID and generate a Client Secret
Add to .env:
AUTH_GITHUB_ID=your_client_id
AUTH_GITHUB_SECRET=your_client_secretGoogle OAuth
- Go to console.cloud.google.com → APIs & Services → Credentials
- Click Create Credentials → OAuth client ID
- Application type: Web application
- Add authorized redirect URI:
http://localhost:3000/api/auth/callback/google - Copy the Client ID and Client Secret
Add to .env:
AUTH_GOOGLE_ID=your_client_id
AUTH_GOOGLE_SECRET=your_client_secretProduction callback URLs
Replace http://localhost:3000 with your production domain in all callback URLs.
OAuth callback URLs must match exactly — trailing slashes, http vs https, and port numbers all matter.