Sample applications showing how to integrate third-party authentication providers with InsForge. Each example is a standalone app that demonstrates JWT-based auth with InsForge's Row Level Security (RLS).
| Integration | Framework | Demo | Guide |
|---|---|---|---|
auth0 |
Next.js | auth0auth.insforge.site | Guide |
clerk |
React + Vite | clerkauth.insforge.site | Guide |
kinde |
Next.js | kindeauth.insforge.site | Guide |
stytch |
Next.js | stytchauth.insforge.site | Guide |
workos |
Next.js | workosauth.insforge.site | Guide |
Each integration follows the same pattern:
- User authenticates with the third-party provider.
- A JWT is signed with InsForge's JWT secret (either by the provider or server-side).
- The JWT is passed to the InsForge SDK as
edgeFunctionToken. - InsForge validates the token and enforces Row Level Security policies.
Since third-party auth providers use string-based user IDs (not UUIDs), all examples use a shared SQL helper function:
create or replace function public.requesting_user_id()
returns text
language sql stable
as $$
select nullif(
current_setting('request.jwt.claims', true)::json->>'sub',
''
)::text
$$;insforge-integration/
└── auth/
├── auth0/
├── clerk/
├── kinde/
├── stytch/
└── workos/
Each directory is an independent application with its own dependencies, environment variables, and setup instructions.
- Clone the repository.
- Move into the integration you want to use.
- Install dependencies with
npm install. - Copy the integration's example environment file.
- Follow that integration's
README.mdfor any required InsForge setup, provider configuration, and local development steps.
For full setup details, go directly to the integration README you want to use:
auth/auth0/README.mdauth/clerk/README.mdauth/kinde/README.mdauth/stytch/README.mdauth/workos/README.md
- Open an issue if you believe you've encountered a bug that you want to flag for the team.