Skip to main content

Type Alias: EmailAuthHooks

EmailAuthHooks = object

Defined in: auth-core/src/emailAuthTypes.ts:231

Properties

enrichSession?

optional enrichSession?: (args) => Promise<EmailAuthSession> | EmailAuthSession

Defined in: auth-core/src/emailAuthTypes.ts:242

Called after issueSession, to fold application state into the response body without the engine knowing about it.

Parameters

ParameterType
args{ session: EmailAuthSession; user: EmailAuthUser; }
args.sessionEmailAuthSession
args.userEmailAuthUser

Returns

Promise<EmailAuthSession> | EmailAuthSession


onUserCreated?

optional onUserCreated?: (user) => Promise<void> | void

Defined in: auth-core/src/emailAuthTypes.ts:237

Called after a user row is created, before a session is issued. The place for application-specific bootstrapping (a default workspace, a free-plan subscription, an analytics identify call).

Parameters

ParameterType
userEmailAuthUser

Returns

Promise<void> | void