InsForge now supports Clerk for authentication.
Clerk handles sign-up, sessions, and user management; InsForge keeps your database and Row Level Security. The two connect through a single JWT template — no user sync, no custom backend.
How It Works
Clerk signs the session token with InsForge's JWT secret. InsForge accepts it natively — no exchange service, no user sync, no custom middleware.
- Create a JWT template in Clerk. Set the algorithm to
HS256and paste InsForge's JWT secret as the signing key. - Add two claims:
role: "authenticated"andaud: "insforge-api". - In your app, pass the Clerk-issued token to the InsForge SDK.
- Write RLS policies against the
subclaim. Done.
The Bridge: insforge.ts
Normally, the InsForge SDK carries its own session token. With Clerk, there is no InsForge session — so insforge.ts grabs the token from Clerk and hands it to the SDK:
const token = await getToken({ template: 'insforge' });
insforge.auth.setAuthToken(token);
That swap is the integration. Everything else is scaffolding.
Three Prompts
You don't write the bridge file by hand. InsForge ships skills that teach coding agents how its SDK, RLS, and integrations work. Three prompts scaffold the whole app:
- Set up the InsForge client with Clerk.
- Create a todos table with RLS so users only see their own rows.
- Build the todo page with full CRUD.
Review the diff. Ship.
What Lives Where
After signup, the split is clean:
- Clerk Dashboard → Users: every user, email, session, login history.
- InsForge Dashboard → Database: app data, each row tagged with the user.
- InsForge Dashboard → Auth → Users: empty. Clerk owns the identity; InsForge only sees the sub claim per request.

