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
- Open-weight coding-agent router hits 79.8% on Terminal-Bench 2.1 for $76 — kimmonismus · 2026-07-25
- Pokee says its sandbox can connect agents to hundreds of everyday tools — Kyrannio · 2026-07-25
- AI coding tool screenshots a WSL compatibility check, not a feature launch — zeeg · 2026-07-25
- Manning’s new AI codebase book teaches 10 mental models for reading unfamiliar repos — ZacharyHuang12 · 2026-07-25
- drskill adds trace-based auditing for agent loadouts, skills, and MCP triggers — dbreunig · 2026-07-25
- How to design production-grade agent systems for RAG, voice bots, and low latency — babySasuk3 · 2026-07-25