Type Alias: EmailAuthHooks
EmailAuthHooks =
object
Defined in: auth-core/src/emailAuthTypes.ts:231
Properties
enrichSession?
optionalenrichSession?: (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
| Parameter | Type |
|---|---|
args | { session: EmailAuthSession; user: EmailAuthUser; } |
args.session | EmailAuthSession |
args.user | EmailAuthUser |
Returns
Promise<EmailAuthSession> | EmailAuthSession
onUserCreated?
optionalonUserCreated?: (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
| Parameter | Type |
|---|---|
user | EmailAuthUser |
Returns
Promise<void> | void