Creating an OAuth2-powered AI automation tool with temporary access tokens - why isn't this more common?

Hi everyone!

I’ve been thinking about building an AI assistant that works differently from what I see out there. The main idea is using OAuth2 for temporary permissions instead of storing API keys forever.

Here’s how I imagine it working:

When I tell the bot “analyze sales data and save it to my spreadsheet”, it would ask me to authorize access to my account, do the work, then immediately delete the access token. Next time I need something similar, it asks for permission again.

Same thing if I want it to create a post for social media or update my calendar. Fresh authorization each time, no permanent access stored anywhere.

What I want to build:

  • Support for multiple platforms (spreadsheets, social networks, productivity apps)
  • OAuth2 flows that get wiped after each task
  • Clear logs showing exactly what was accessed
  • Just-in-time permissions instead of always-on access

I’ve looked around but most AI tools either don’t connect to external services properly, or they’re locked into one company’s ecosystem. The ones that do integrate seem to want permanent API access.

Has anyone seen something like this? Or tried building it themselves? I’m curious if there are technical reasons why this approach isn’t more popular.

Thanks for any insights!

I prototyped something like this two years ago and hit some walls that probably explain why it’s not common yet. The main problem? User friction. People hate constantly re-authenticating, especially when they’re automating repetitive stuff. They’d just bail halfway through when they saw another OAuth popup. There’s also a technical mess with token lifecycle management. Lots of APIs rate-limit OAuth token generation, so you’ll hit those limits during heavy usage. Google’s APIs were the worst offenders in my tests. Your security model is solid though - it tackles real privacy issues. I think the sweet spot is somewhere between your approach and permanent tokens. Maybe time-bounded tokens that last a session or a few hours instead of getting killed immediately. You’d cut friction while still limiting exposure compared to permanent API keys.