fix(sync): correct Gmail-connect redirect URI default #4076
ccantynzcommented Jun 10, 2026
Originally written by @vercel[bot] on GitHub.
Deployment failed with the following error:
There is no GitHub account connected to this Vercel account.ccantynzcommented Jun 10, 2026
Originally written by @vercel[bot] on GitHub.
The latest updates on your projects. Learn more about Vercel for GitHub.
| Project | Deployment | Actions | Updated (UTC) |
|---|---|---|---|
| alec-rae-com-admin | Preview, Comment | Jun 10, 2026 9:30am |
Cross-repo impact
See what breaks downstream if this PR merges.
⮌ Merged
This pull request was merged into main.
c comment · e edit title · m merge · a approve · r request changes · ? shortcuts
Originally written by @ccantynz-alt on GitHub.
Imported from https://github.com/ccantynz-alt/AlecRae.com/pull/55
What
Fixes the fallback default for
GOOGLE_REDIRECT_URIin the Gmail sync engine.The bug
apps/api/src/sync/engine.tsis the Gmail mailbox connection OAuth flow (read/send mail), so its redirect must be the connect callback. But the fallback default pointed at the identity sign-in callback instead:-const GOOGLE_REDIRECT_URI = process.env["GOOGLE_REDIRECT_URI"] ?? "https://api.alecrae.com/v1/auth/callback/google"; +const GOOGLE_REDIRECT_URI = + process.env["GOOGLE_REDIRECT_URI"] ?? "https://api.alecrae.com/v1/connect/callback/gmail";This contradicted
.env.production(which documentsGOOGLE_REDIRECT_URI=https://api.alecrae.com/v1/connect/callback/gmail) and would have sent Gmail-connect OAuth to the wrong redirect if the env var were ever unset.Impact
Latent only — production sets
GOOGLE_REDIRECT_URIvia the Vapron-managed secret, which overrides the default. This just makes the code-level default correct and consistent with the documented config.Verification
bun run typecheck— ✅https://claude.ai/code/session_01McgJLnTbZG9mwhfwd5iAX3
Generated by Claude Code