index.ts overview
WorkOS as an effect-auth backend: WorkOS keeps the users, passwords and sessions, and the core’s services, hooks and HTTP tier run over it. layer provides what Http.make needs.
Since v0.1.0
Exports Grouped by Category
layers
layer
The WorkOS backend over the platform fetch: every service Http.make needs except the app’s Hooks, plus OAuthService and SsoService over AuthKit.
Signature
declare const layer: (config: WorkOSConfig) => Layer.Layer<Services, never, Requirements>
Since v0.1.0
layerHttpClient
The WorkOS backend over the HttpClient in context, for a custom transport or a test.
Signature
declare const layerHttpClient: (
config: WorkOSConfig
) => Layer.Layer<Services, never, Requirements | HttpClient.HttpClient>
Since v0.1.0
models
Requirements (type alias)
What the app provides beside layer: its Hooks (plugins), the OAuthStateStore and RootSecret the AuthKit sign-in needs. Optional and read where the layer is built: Session.RevokedSessions (revocations seen before an access token expires), an EmailSender (required with delivery: "app") and OutboundLimits.
Signature
type Requirements = Auth.Hooks.Hooks | Auth.OAuth.OAuthStateStore | Auth.RootSecret.RootSecret
Since v0.1.0
Services (type alias)
Every service layer provides.
Signature
type Services =
| WorkOSClient
| Session.WorkOSSessions
| Session.WorkOSAuthenticate
| Auth.SessionService.SessionService
| Auth.UserStore.UserStore
| Auth.Identifier.IdentifierStore
| Auth.User.UserService
| Auth.Email.EmailPasswordService
| Auth.Email.EmailVerificationService
| Auth.Email.EmailOtpService
| Auth.Password.PasswordResetService
| Auth.Password.PasswordHasher
| Auth.AuthLifecycle.AuthLifecycleService
| Auth.OAuth.OAuthService
| Auth.Sso.SsoService
Since v0.1.0
utils
AuthKit (namespace export)
Re-exports all named exports from the “./AuthKit.ts” module as AuthKit.
Signature
export * as AuthKit from "./AuthKit.ts"
Since v0.1.0
Authorization (namespace export)
Re-exports all named exports from the “./Authorization.ts” module as Authorization.
Signature
export * as Authorization from "./Authorization.ts"
Since v0.1.0
Codes (namespace export)
Re-exports all named exports from the “./Codes.ts” module as Codes.
Signature
export * as Codes from "./Codes.ts"
Since v0.1.0
EmailPassword (namespace export)
Re-exports all named exports from the “./EmailPassword.ts” module as EmailPassword.
Signature
export * as EmailPassword from "./EmailPassword.ts"
Since v0.1.0
Events (namespace export)
Re-exports all named exports from the “./Events.ts” module as Events.
Signature
export * as Events from "./Events.ts"
Since v0.1.0
Schemas (namespace export)
Re-exports all named exports from the “./Schemas.ts” module as Schemas.
Signature
export * as Schemas from "./Schemas.ts"
Since v0.1.0
Seal (namespace export)
Re-exports all named exports from the “./Seal.ts” module as Seal.
Signature
export * as Seal from "./Seal.ts"
Since v0.1.0
Session (namespace export)
Re-exports all named exports from the “./Session.ts” module as Session.
Signature
export * as Session from "./Session.ts"
Since v0.1.0
Users (namespace export)
Re-exports all named exports from the “./Users.ts” module as Users.
Signature
export * as Users from "./Users.ts"
Since v0.1.0
Webhook (namespace export)
Re-exports all named exports from the “./Webhook.ts” module as Webhook.
Signature
export * as Webhook from "./Webhook.ts"
Since v0.1.0
WorkOS (namespace export)
Re-exports all named exports from the “./WorkOS.ts” module as WorkOS.
Signature
export * as WorkOS from "./WorkOS.ts"
Since v0.1.0