index
Interfaces
| Interface | Description |
|---|---|
| CreateOryKratosAppOptions | - |
| KratosAction | A single Kratos webhook delivery, packaged for the application. |
| KratosActionContext | Kratos webhook context as templated by function(ctx) ctx. Fields are documented in https://www.ory.sh/docs/kratos/hooks/configure-hooks under "Available web hook context". All fields are optional from saflib's perspective: presence depends on which flow stage fired the hook (e.g. identity is present on after.<method> hooks, absent on before). |
| KratosActionHandler | Application-level handler. Called once per accepted webhook delivery. |
| KratosCourierCallbacks | Hooks for each supported valid template type. Unsupported / invalid templates are rejected before dispatch. |
| LoginCodeValidPayload | - |
| RecoveryCodeValidPayload | - |
| RecoveryValidPayload | - |
| RegistrationCodeValidPayload | - |
| StartOryKratosServiceOptions | - |
| User | Courier callbacks aligned with Ory Identities built-in email templates (valid flows only). |
| VerificationCodeValidPayload | - |
| VerificationValidPayload | - |
Type Aliases
| Type Alias | Description |
|---|---|
| KratosCourierTemplateId | Canonical IDs use dots, e.g. verification_code.valid. |
Functions
| Function | Description |
|---|---|
| createOryKratosApp | Express app for the Ory Kratos HTTP courier callback only (internal network). |
| createPostKratosCourierHandler | - |
| fetchKratosIdentityById | Fetches a Kratos identity by id from the admin API. |
| kratosAdminBaseUrl | Shared Kratos Admin API helpers (identity lookup by id / email). |
| makePostKratosActionHandler | Mounts as POST /kratos/action. Parses JSON body, packages it as a KratosAction, and forwards to handler.onAction. |
| resolveAuthFromIdentityId | Resolve a fresh Auth (from @saflib/node) for userId via the Kratos admin API. |
| resolveEmailFromIdentityId | Resolves a member's email from the Kratos admin API. Returns null when the lookup fails. |
| resolveUserIdByEmail | Resolves a user's id from the Kratos admin API by email. Returns null when the lookup fails or no identity matches. |
| startOryKratosService | - |