Skip to content
Migrating from NextAuth.js v4? Read our migration guide.

WorkOS Provider

리소스

설정

콜백 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" })],
})
Auth.js © Balázs Orbán and Team - 2025