Where do you store OAuth tokens that your AI agents use to call third-party services?

Reddit r/AI_Agents News

Summary

Discussion of best practices for storing and managing OAuth tokens used by AI agents to call third-party services, covering token refresh, revocation, and scope drift.

I am building an agentic app where the agent connects to gmail, calendar, notion, slack on behalf of the user. each integration has its own oauth flow, its own token, its own refresh cycle. Current setup is an encrypted postgres column with a cron handling refresh. it works but it feels brittle, and i'm not loving that i'm holding 4 different sets of third-party credentials per user with no real audit trail when the agent uses them. been looking around, saw descope has an "agentic identity hub" thing that apparently handles the connections + token vault side specifically for agents, also saw people mention hashicorp vault + a custom refresh layer, and a few teams just using aws secrets manager and praying. mostly want to know how teams handle refresh + revocation when a user disconnects an integration mid-session, and how you stop scope drift over time when the agent keeps asking for more???
Original Article

Similar Articles