A one-column type mismatch broke every production OAuth login on a remote MCP server
Capedcrusader1923 · reddit · 2026-07-25
A developer describes a remote MCP server bug where every OAuth login failed in production, but only after the user had already approved the flow.
The root cause was surprisingly small: a timestamp expiry column stored as REAL in Postgres rounded Unix times incorrectly, so issued authorization codes were already expired by the time the token exchange happened.
Key takeaways:
- Log the token exchange, not just the authorize step.
- Include the rejection reason, not only the failure.
- Don’t assume dev and prod DB types behave the same; SQLite and Postgres differ in ways that can silently break auth.
More from coding & agent
- Alchemy adds effect/Workflow support across Durable Objects, Workflows and Lambda Durable Functions — samgoodwin89 · 2026-10-27
- Alchemy's Lambda Web Functions run plain Node web servers on Lambda, no OpenNext needed — samgoodwin89 · 2026-10-27
- Alchemy Domain brings domain-driven design and story testing to Effect backends — samgoodwin89 · 2026-10-27
- Alchemy makes all ~2,850 AWS bindings work from any cloud, not just S3/Lambda/DynamoDB — samgoodwin89 · 2026-10-27
- Production AI agent scored 95% robustness at baseline, 37% under adversarial attack — njyx · 2026-10-27
- Chaining Grok Bot and Codex to detect and mass-block AI reply accounts — vista8 · 2026-10-27