Skip to content

Introduction

Authpipe is the credential management layer between your app and every third-party API. It handles OAuth authorization flows, encrypted token storage, silent refresh, API key management, and webhook signing — so you never write credential management code again.

Clerk (user auth)Authpipe (API connections)
Authenticates your usersManages credentials for third-party APIs
Session tokensAlways-valid access tokens
<SignIn />createAuthSession("slack")
useUser()getCredential("google-drive")

Clerk answers “who is this user?” Authpipe answers “give me a working Slack token for this tenant.”

Authpipe manages credentials at three levels:

TierEntityExample
App identityProvider ConfigYour Slack OAuth app’s client_id / client_secret
InstallationInstallationA Slack bot installed in a customer’s workspace
UserConnectionA user’s personal OAuth grant to your Slack app

All secrets are encrypted with AES-256-GCM using per-workspace isolation keys.

import { Authpipe } from "@authpipe/node";
const authpipe = new Authpipe({
apiKey: process.env.AUTHPIPE_API_KEY,
});
// Get a valid credential — always fresh, always ready
const { credential } = await authpipe.getCredential({
provider: "google-drive",
tenantId: "org_acme",
userId: "user_123",
});
  1. Configure a provider — Register your OAuth app’s client_id and client_secret with Authpipe.
  2. User connects — Create an auth session, redirect the user, Authpipe handles the OAuth callback and stores encrypted tokens.
  3. Get credentials — Call getCredential from your backend. Authpipe returns a valid access token, refreshing it automatically if needed.
  4. Automatic refresh — A background scheduler refreshes tokens before they expire. If refresh fails, the connection is marked needs_reauth and an event is emitted.
  • Quickstart — Set up your first integration end-to-end.
  • Core Concepts — Understand workspaces, providers, connections, and the attachment model.
  • SDK Reference — Full API surface for Node, Go, and Python.