OAuth callback
The endpoint that an OAuth provider redirects to after the user authorizes the application. The callback receives the authorization code, exchanges it for a token, and persists the token bound to the user's account.
Why it matters
OAuth is the standard for letting an application act on a user's behalf at a third-party service (Gmail, Calendar, Spotify, Stripe). The callback is the operationally tricky part: state-parameter validation, token persistence, atomic writes, error handling. Done badly, the callback is the most common source of integration bugs and the biggest credential-leak risk.
For an AI agent product with 21 OAuth integrations, the callback is hit thousands of times a day across all users. Reliability and security at this layer are non-negotiable.
How Ajeris handles this
OAuth callbacks are handled by the gateway service. State parameters are validated; tokens are encrypted at rest using industry-standard symmetric encryption; multi-account discrimination (one user with multiple Gmail accounts) is keyed on the provider's account ID. Refresh-token rotation handled atomically per provider's quirks (Xero rotates immediately; QuickBooks rotates on every refresh; Square does not rotate at all).