Skip to main content

Type Alias: EmailAuthDelivery

EmailAuthDelivery = object

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

Everything the application needs to compose and send one auth email. The engine mints and persists the token, then hands the plaintext here exactly once — there is no transport dependency in this package, so the application sends it with whichever provider it already uses (Resend, SES, SMTP, …).

Properties

expires

expires: Date

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


purpose

purpose: OneTimeTokenPurpose

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


to

to: string

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

Normalized recipient address.


token

token: string

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

The plain token. For emailCode this is the digit code to show the user; for the link flows it is already embedded in url.


url?

optional url?: string

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

The absolute URL to put behind the call to action, present for every purpose except emailCode. Built from baseUrl and the flow's paths.


user

user: EmailAuthUser | null

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

The user the token was issued for, or null when a code was mailed to an address that has no user row yet.