Source: Robin Guldener (Nango), "What we learned operating auth for 1,000+ APIs" (2026-08-06). Found via TLDR Dev 2026-11-24. Nango is an open-source integration and auth layer for apps and agents, so this is a vendor post, but it is a field report with named providers and specific failures, not a pitch.
Lessons
Rotation makes refresh bugs permanent. In May 2025 a bad
ifmeant refreshed credentials were not saved. The fix was reverted in under two hours, but scheduled jobs had already thrown away tokens for hundreds of connections. Most providers still accepted the old refresh token. Airtable and Atlassian do not, so those users had to re-consent. Nango now writes the new token before anything else, tests that path, and pages on refresh anomalies: "treat refresh tokens like money, not cache."Concurrent refreshes can revoke everything. Airtable revokes the whole grant on a duplicate refresh after a short grace period and kills the old access token, so long jobs fail mid-run. Xero allows reuse of the previous refresh token for 30 minutes. Nango serialises refreshes per connection behind a distributed lock.
Refresh timing is provider-specific. Exact Online tokens last 10 minutes and reject refreshes more than 30 seconds before expiry, so a blanket "refresh 15 minutes early" rule always failed. Buffers are now per provider.
You often cannot know when a token expires.
expires_inis optional in RFC 6749. Zendesk returns it only on request; Salesforce returns none, and its introspection endpoint intermittently errored. NetSuite refresh tokens die after 7 days; Google's after six months unused. Nango refreshes idle credentials on a schedule so they never go stale.Errors that look like success. Zoho CRM returns HTTP 200 with an error body. Workday and Dayforce return empty data when a permission is missing. LastPass's credential check is a string search for "Authorization Error".
Providers change auth without notice. 16% of commits to Nango's provider config are fixes. Figma moved credentials to a Basic header and changed its OAuth host by email.
Build tools around providers. A mock server for Salesforce Data Cloud's chained token exchanges, because test orgs lack the features.
Scale: about 935 providers in the registry; 276 have an endpoint Nango can call to check a credential works.
Why it matters for a staff engineer
The post never mentions agents directly, but this is the auth layer under every MCP server and tool integration (R062 covers the OAuth 2.1 spec side). Agents make it worse: they run unattended for hours, fan out parallel calls on one connection, and treat an empty 200 as a real answer. The concrete rules carry over: persist a rotated token before using it, one refresh in flight per connection, per-provider expiry buffers, scheduled refresh of idle grants, and verify success by content, not status code.