WorkOS 提供商
资源
设置
回调 URL
https://example.com/api/auth/callback/workos
环境变量
AUTH_WORKOS_ID
AUTH_WORKOS_SECRET
WorkOS 还要求您将 connection
ID 传递给提供商。
配置
/auth.ts
import NextAuth from "next-auth"
import WorkOS from "next-auth/providers/workos"
export const { handlers, auth, signIn, signOut } = NextAuth({
providers: [WorkOS({ connection: "conn_abc123" })],
})