Building a Secure AI Agent Gateway: Self-Hosting OAuth for Multiple SaaS Apps
Defiant_Cod_2654 · reddit · 2026-07-22
A development team is building a gateway to govern AI agent tool calls, with hard constraints dictating that customer credentials must stay on the customer's own infrastructure without incurring per-call costs.
Core Architecture Debate
- Core Integrations: The team leans toward building a thin OAuth provider registry in-house for 15–20 critical apps (Slack, GitHub, Google, etc.) to fully own the handshake and vault.
- Long-tail Integrations: Betting on MCP (Model Context Protocol) to handle the long tail of app integrations.
Community Questions
- Maintenance: How severe is the ongoing maintenance for a custom multi-app OAuth layer as vendor APIs drift?
- Open Source: Are there embed-friendly open-source options that keep tokens on your own infra?
- Build vs. Buy: Should one eat a Composio/Nango dependency early for speed and rip it out later, or build the thin layer from day one?
More from coding & agent
- Rowboat launches as an open-source, local-first AI coworker with memory — ycombinator · 2026-07-22
- Reddit user chains Ideogram 4 and Krea2 to mimic bbox-based image positioning — v3lh0t05c0 · 2026-07-22
- Apollo Cuts AI Assistant Skill Dev Time by 85% with Deep Agents — LangChain · 2026-07-22
- Scoble says AI “loops” really means long-running multi-agent workspaces — Scobleizer · 2026-07-22
- Kimi Code opens a waitlist as Moonshot rolls out its coding product — Fabulous_Bonus_8981 · 2026-07-22
- Open-source runtime lets each repo define its own AI code reviewer — ibabufrik · 2026-07-22