---
id: daily-insforge-integrations
name: "insforge-integrations"
url: https://skills.yangsir.net/skill/daily-insforge-integrations
author: insforge
domain: ai-app-building-integration
tags: ["authentication", "integration", "oauth", "clerk"]
install_count: 5400
rating: 4.40 (30 reviews)
github: https://github.com/insforge/agent-skills
---

# insforge-integrations

> 集成第三方身份认证提供商到 InsForge 平台，提供 Clerk 等主流认证服务的配置指南和最佳实践

**Stats**: 5,400 installs · 4.4/5 (30 reviews)

## Before / After 对比

### 认证集成开发

**Before**:

研究 Clerk 官方文档，理解 OAuth 流程和 API 设计，反复调试认证逻辑和会话管理，集成需要 2-3 天

**After**:

参考 InsForge 集成指南，复制经过验证的配置和代码模板，处理常见边缘情况，2 小时完成认证集成

| Metric | Before | After | Change |
|---|---|---|---|
| 开发时间 | 48小时 | 2小时 | -96% |

## Readme

# insforge-integrations

# InsForge Integrations

This skill covers integrating **third-party authentication providers** with InsForge. Each provider has its own guide under this directory.

## Supported Providers

Provider
Guide
When to use

[Clerk](https://github.com/insforge/agent-skills/blob/HEAD/skills/insforge-integrations/references/clerk.md)
Clerk JWT Templates + InsForge RLS
Clerk signs tokens directly via JWT Template — no server-side signing needed

[Auth0](https://github.com/insforge/agent-skills/blob/HEAD/skills/insforge-integrations/references/auth0.md)
Auth0 Actions + InsForge RLS
Auth0 uses a post-login Action to embed claims into the access token

[WorkOS](https://github.com/insforge/agent-skills/blob/HEAD/skills/insforge-integrations/references/workos.md)
WorkOS AuthKit + InsForge RLS
WorkOS AuthKit middleware + server-side JWT signing with `jsonwebtoken`

[Kinde](https://github.com/insforge/agent-skills/blob/HEAD/skills/insforge-integrations/references/kinde.md)
Kinde + InsForge RLS
Kinde token customization for InsForge integration

[Stytch](https://github.com/insforge/agent-skills/blob/HEAD/skills/insforge-integrations/references/stytch.md)
Stytch + InsForge RLS
Stytch session tokens for InsForge integration

## Common Pattern

All integrations follow the same core pattern:

- **Auth provider signs or issues a JWT** containing the user's ID

- **JWT is passed to InsForge** via `edgeFunctionToken` in `createClient()`

- **InsForge extracts claims** via `request.jwt.claims` in SQL

- **RLS policies** use a `requesting_user_id()` function to enforce row-level security

## Choosing a Provider

- **Clerk** — Simplest setup; JWT Template handles signing, no server code needed

- **Auth0** — Flexible; uses post-login Actions for claim injection

- **WorkOS** — Enterprise-focused; AuthKit middleware + server-side JWT signing

- **Kinde** — Developer-friendly; built-in token customization

- **Stytch** — API-first; session-based token flow

## Setup

- Identify which auth provider the project uses

- Read the corresponding reference guide from the table above

- Follow the provider-specific setup steps

## Usage Examples

Each provider guide includes full code examples for:

- Auth provider dashboard configuration

- InsForge client utility with `edgeFunctionToken`

- `requesting_user_id()` SQL function and RLS policies

- Environment variable setup

Refer to the specific `references/<provider>.md` file for complete examples.

## Best Practices

- All provider user IDs are strings (not UUIDs) — always use `TEXT` columns for `user_id`

- Use `requesting_user_id()` instead of `auth.uid()` for RLS policies

- Set `edgeFunctionToken` as an async function (Clerk) or server-signed JWT (Auth0, WorkOS, Kinde, Stytch)

- Always get the JWT secret via `npx @insforge/cli secrets get JWT_SECRET`

## Common Mistakes

Mistake
Solution

Using `auth.uid()` for RLS
Use `requesting_user_id()` — third-party IDs are strings, not UUIDs

Using UUID columns for `user_id`
Use `TEXT` — all supported providers use string-format IDs

Hardcoding the JWT secret
Always retrieve via `npx @insforge/cli secrets get JWT_SECRET`

Missing `requesting_user_id()` function
Must be created before RLS policies will work

Weekly Installs723Repository[insforge/agent-skills](https://github.com/insforge/agent-skills)GitHub Stars13First Seen3 days agoSecurity Audits[Gen Agent Trust HubPass](/insforge/agent-skills/insforge-integrations/security/agent-trust-hub)[SocketPass](/insforge/agent-skills/insforge-integrations/security/socket)[SnykPass](/insforge/agent-skills/insforge-integrations/security/snyk)Installed ongemini-cli723antigravity723cline723github-copilot723codex723cursor723

---
*Source: https://skills.yangsir.net/skill/daily-insforge-integrations*
*Markdown mirror: https://skills.yangsir.net/api/skill/daily-insforge-integrations/markdown*