AJERIS
TourBlogDocsLog inText us
Log inText us
← All terms
Category
Integrations and MCP
Related terms
  • OAuth flow
  • Bearer token
  • Encryption at rest
  • Encrypted credential
Glossary · Integrations and MCP

Refresh token rotation

Refresh token rotation is the OAuth practice of issuing a fresh refresh token every time an access token is refreshed, invalidating the previous one. The pattern detects token theft: if both old and new are presented, the server treats it as compromise and revokes everything.

Why it matters

OAuth refresh tokens are long-lived credentials. If a refresh token leaks, an attacker can keep generating fresh access tokens indefinitely. Rotation is the defense.

The pattern: every time the agent calls /oauth/token with grant_type=refresh_token to get a new access token, the server issues both a new access token AND a new refresh token. The old refresh token is invalidated. If the agent ever tries to use the old refresh token again (because it was leaked, the server saw both old and new presented), the server treats it as compromise and revokes the entire session.

This works because legitimate clients always use the most recent refresh token. An attacker who stole an old token would either get a stale-token error (revealing the leak) or, if they intercepted recently, would use the same refresh token the legitimate client also uses, triggering detection.

For AI agents managing OAuth tokens for many users and many services, rotation is the baseline production hygiene. Most modern OAuth providers (Google, Microsoft, GitHub) require it.

How Ajeris handles this

Ajeris implements refresh token rotation for every OAuth integration. When the agent refreshes an access token, both the new access token and the new refresh token are persisted encrypted at rest. The old refresh token is discarded. If a stale token is ever presented (theft scenario), the upstream OAuth provider revokes the session and the agent surfaces a re-auth prompt to the user.

The handling is invisible to the user; tokens just keep working until the user revokes access at the source.

See it work.

Text +1 (470) 821 4265. Free to try.

Text on WhatsApp
Connects to

Every tool you already use. Your agent does the rest.

WhatsApp
Gmail
Calendar
Slack
Notion
GitHub
Instagram
Spotify
Uber
DoorDash
Apple Music
Telegram
WhatsApp
Gmail
Calendar
Slack
Notion
GitHub
Instagram
Spotify
Uber
DoorDash
Apple Music
Telegram
Shopify
QuickBooks
Xero
Square
HubSpot
Salesforce
Stripe
Lyft
Alexa
Google LSA
Hue
Claude
Shopify
QuickBooks
Xero
Square
HubSpot
Salesforce
Stripe
Lyft
Alexa
Google LSA
Hue
Claude

Message to start

+1 470 821 4265

Message the number above on WhatsApp or by SMS. Your assistant replies within seconds and sets itself up in the conversation. Or sign up by web form to be added to our list.

Welcome message. “Hi. I’m Ajeris. I’ll be your personal agent. What should I call you? Reply STOP to unsubscribe, HELP for help.”

STOP to unsubscribe. HELP for support.

Message and data rates may apply. Carriers are not liable for delayed or undelivered messages. Message frequency varies based on your interaction with the agent.

Questions: hi@ajeris.com

Your assistant is already in your phone. You just need to text it.

The personal assistant you can actually get today. No app, no waitlist.

WhatsApphi@ajeris.com
Personal
  • Channels
  • Morning brief
  • Meetings
  • Research and build
  • Laptop on a leash
  • Everyday
  • Memory
Platform
  • Connectors
  • Platform
Developers
  • Docs
  • Quickstart
  • Platform overview
  • Memory model
  • Skills
  • Scheduled tasks
  • MCP server
  • Claude Code
  • Alexa+
Resources
  • Blog
  • Compare
  • Glossary
  • Live webinar
  • Creator Program
Trust
  • Privacy
  • Security
  • Terms
  • Data retention
  • Access controls
  • Vulnerability management
  • Opt in
  • Disconnect

Your personal agent, by text.

Try it free·Ajeris for business·docs.ajeris.com·© 2026 Ajeris