Pass-through OAuth service for self-hosted AucoBot. Deploy on Vercel (free tier OK).
- Does not persist refresh tokens long-term (Vercel KV TTL ~2 minutes for handoff only).
- Fixed callback URL for Google / GitHub OAuth apps.
| Method | Path | Description |
|---|---|---|
| GET | /oauth/{provider}/start |
Start OAuth (provider: google, github) |
| GET | /oauth/callback |
Provider callback (register this URL) |
| POST | /api/complete |
Exchange relay_code for tokens (server-to-server) |
| GET | /health |
Health check |
cd oauth-proxy
cp .env.example .env
# Fill GOOGLE_* / GITHUB_* / RELAY_API_SECRET
npm install
npm run dev
# http://localhost:3090Without Vercel KV env vars, uses in-memory store (fine for local dev).
- Import repo / set root directory to
oauth-proxy - Add Vercel KV storage → binds
KV_REST_API_URL/KV_REST_API_TOKEN - Set environment variables from
.env.example - Custom domain:
oauth.aucobot.com
- Create OAuth Web application
- Authorized redirect URI:
https://oauth.aucobot.com/oauth/callback - Copy Client ID / Secret → Vercel env
GOOGLE_CLIENT_ID,GOOGLE_CLIENT_SECRET
- Settings → Developer settings → OAuth Apps → New
- Authorization callback URL:
https://oauth.aucobot.com/oauth/callback - Copy Client ID / Secret →
GITHUB_CLIENT_ID,GITHUB_CLIENT_SECRET
OAUTH_MODE=relay
OAUTH_RELAY_URL=https://oauth.aucobot.com
OAUTH_RELAY_API_SECRET=<same as RELAY_API_SECRET on relay>Provider registry scopes reference Nango providers.yaml (URLs only).
ALLOWED_RETURN_URL_PREFIXES— comma-separated prefixes forreturn_urlRELAY_API_SECRET— Bearer token forPOST /api/complete- Never log token values