Skip to main content

Setup

1

Get credentials

Go to vercel.com/integrations and click Add New Integration. Under OAuth 2.0, add your redirect URI:
https://your-app.com/api/kavach/auth/oauth/callback/vercel
2

Configure

lib/kavach.ts
import { createKavach } from 'kavachos';
import { oauth } from 'kavachos/auth';

const kavach = await createKavach({
  database: { provider: 'sqlite', url: 'kavach.db' },
  plugins: [
    oauth({
      providers: [
        {
          id: 'vercel',
          clientId: process.env.VERCEL_CLIENT_ID!,
          clientSecret: process.env.VERCEL_CLIENT_SECRET!,
        },
      ],
    }),
  ],
});
VERCEL_CLIENT_ID=...
VERCEL_CLIENT_SECRET=...

Scopes

Default scopes: user
ScopeWhat it unlocks
userRead user profile and email
deploymentsRead deployment info
projectsRead project info
Vercel OAuth apps are created as marketplace integrations. The access token grants access to the user’s personal account and any teams they belong to.

Endpoints

MethodPathDescription
GET/auth/oauth/authorize/vercelRedirect to Vercel
GET/auth/oauth/callback/vercelHandle callback
Last modified on April 17, 2026