OAuth provider setup
Runbook
Step-by-step console walkthroughs for each OAuth provider BoringStack
supports. Credentials map to env vars consumed by
oauth.manifest.ts.
3
providers supported
PKCE
OAuth flow
compose/.env
credential store
Set these base URLs before creating apps (replace example.com with your domain):
| Variable | Example |
|---|---|
FRONTEND_URL | https://example.com |
PUBLIC_API_URL | https://example.com/api |
OAuth callback URL pattern for all providers:
https://example.com/api/v1/auth/oauth/{provider}/callbackWhere {provider} is google, github, or linkedin.
Local development
Section titled “Local development”For the Docker Compose dev stack (api-dev on port 3000, Vite UI on 3001), register additional redirect URIs in each provider console:
http://localhost:3000/api/v1/auth/oauth/google/callbackhttp://localhost:3000/api/v1/auth/oauth/github/callbackhttp://localhost:3000/api/v1/auth/oauth/linkedin/callbackAPI secrets go in infra/compose/compose/.env (same GOOGLE_OAUTH_* / GITHUB_OAUTH_* / LINKEDIN_OAUTH_* keys as production).
OAuth login buttons render when the API has credentials for a provider — the UI reads GET /api/v1/capabilities/ and shows buttons for each entry in oauth.providers. No UI-side OAuth client IDs are required. After changing env, restart api-dev and the Vite dev server.
When VITE_API_URL is empty, the browser uses same-origin relative /api paths and Vite proxies to VITE_API_PROXY_TARGET (default http://localhost:3000). Callback URLs still hit the API on port 3000, not the Vite port.
-
Open Google Cloud Console → APIs & Services → Credentials.
-
Create OAuth client ID → Application type: Web application.
-
Authorized redirect URIs — add exactly:
https://example.com/api/v1/auth/oauth/google/callback -
Scopes (requested automatically by BoringStack):
openid,email,profile. -
Copy Client ID and Client secret into
compose/.env:Google OAuth env varsappend to compose/.env $ echo 'GOOGLE_OAUTH_CLIENT_ID=your-client-id.apps.googleusercontent.com' >> compose/.env $ echo 'GOOGLE_OAUTH_CLIENT_SECRET=your-client-secret' >> compose/.env -
Restart the API container after updating env.
GitHub
Section titled “GitHub”-
GitHub → Settings → Developer settings → OAuth Apps → New OAuth App.
-
Homepage URL:
https://example.com -
Authorization callback URL:
https://example.com/api/v1/auth/oauth/github/callback -
Scopes (requested by BoringStack):
read:user,user:email. -
Generate a Client secret and add to
compose/.env:GitHub OAuth env vars $ echo 'GITHUB_OAUTH_CLIENT_ID=your-github-client-id' >> compose/.env $ echo 'GITHUB_OAUTH_CLIENT_SECRET=your-github-client-secret' >> compose/.env
-
LinkedIn Developer Portal → Create app.
-
Under Auth → OAuth 2.0 settings → Authorized redirect URLs:
https://example.com/api/v1/auth/oauth/linkedin/callback -
Request Sign In with LinkedIn using OpenID Connect product (required for
openidscope). -
Scopes:
openid,profile,email. -
Add credentials to
compose/.env:LinkedIn OAuth env vars $ echo 'LINKEDIN_OAUTH_CLIENT_ID=your-linkedin-client-id' >> compose/.env $ echo 'LINKEDIN_OAUTH_CLIENT_SECRET=your-linkedin-client-secret' >> compose/.env
Verify
Section titled “Verify”- Ensure Valkey is running (OAuth state store requires it).
- Hit
GET /api/v1/capabilities/—oauth.providersshould list configured providers. - Open the login page — OAuth buttons appear only for providers with valid env vars.
- Complete a login flow; you should land on
/oauth/successthen/dashboard.