@syncello/auth 4.0.0 → 4.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +47 -0
- package/dist/index.cjs +237 -290
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +63 -1
- package/dist/index.d.ts +63 -1
- package/dist/index.js +236 -290
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -169,6 +169,9 @@ declare const AUTH_DEFAULTS: {
|
|
|
169
169
|
readonly LOCKOUT_DURATION_MINUTES: 30;
|
|
170
170
|
readonly LOCKOUT_MAX_ATTEMPTS: 5;
|
|
171
171
|
readonly PASSWORD_RESET_TTL_MINUTES: 15;
|
|
172
|
+
readonly EMAIL_VERIFICATION_TTL_HOURS: 24;
|
|
173
|
+
readonly EMAIL_CHANGE_TTL_HOURS: 24;
|
|
174
|
+
readonly TWO_FACTOR_EMAIL_CODE_TTL_MINUTES: 5;
|
|
172
175
|
readonly TWO_FACTOR_CHALLENGE_TTL_SECONDS: 300;
|
|
173
176
|
readonly APP_NAME: "App";
|
|
174
177
|
};
|
|
@@ -248,6 +251,14 @@ interface ResendWebhookPayload {
|
|
|
248
251
|
interface EmailBranding {
|
|
249
252
|
/** Full URL to the header logo. Default: `${appUrl}/email-header-image.png` */
|
|
250
253
|
logoUrl?: string;
|
|
254
|
+
/**
|
|
255
|
+
* Logo width in CSS px. With `logoHeight`, the logo renders at that fixed size with `width`
|
|
256
|
+
* and `height` attributes, so clients reserve its space and Outlook sizes it right. Default:
|
|
257
|
+
* unset, and the logo fills half the email's width.
|
|
258
|
+
*/
|
|
259
|
+
logoWidth?: number;
|
|
260
|
+
/** Logo height in CSS px; required with `logoWidth`. */
|
|
261
|
+
logoHeight?: number;
|
|
251
262
|
/** CTA button background. Default: '#00fe9a' */
|
|
252
263
|
buttonBgColor?: string;
|
|
253
264
|
/** CTA button text color. Default: '#000004' */
|
|
@@ -260,6 +271,11 @@ interface EmailBranding {
|
|
|
260
271
|
footerColor?: string;
|
|
261
272
|
/** Heading and welcome-line color. Default: '#1e1b4b' */
|
|
262
273
|
headingColor?: string;
|
|
274
|
+
/**
|
|
275
|
+
* Marketing site the footer's Privacy Policy (`/privacy`) and Get in Touch (`/contact`)
|
|
276
|
+
* links point at. Default: unset, and the footer has no links.
|
|
277
|
+
*/
|
|
278
|
+
marketingUrl?: string;
|
|
263
279
|
}
|
|
264
280
|
|
|
265
281
|
/**
|
|
@@ -2847,6 +2863,52 @@ declare function generate2faEnabledEmail(data: TwoFactorEnabledEmailData, appNam
|
|
|
2847
2863
|
*/
|
|
2848
2864
|
declare function generate2faDisabledEmail(data: TwoFactorDisabledEmailData, appName?: string, appUrl?: string, branding?: EmailBranding): EmailTemplate;
|
|
2849
2865
|
|
|
2866
|
+
/**
|
|
2867
|
+
* The HTML email template: a white card on a light page, the logo, heading, body, an optional
|
|
2868
|
+
* button with its link to copy, an optional notice, a footer note and the footer band, coloured
|
|
2869
|
+
* from the branding options. Tables and inline styles throughout, and a VML button for Outlook.
|
|
2870
|
+
*/
|
|
2871
|
+
|
|
2872
|
+
/** A consumer's own email, in plain text: {@link renderEmail} escapes every value. */
|
|
2873
|
+
interface EmailContent {
|
|
2874
|
+
/** The heading, also the document title. */
|
|
2875
|
+
heading: string;
|
|
2876
|
+
/** Body paragraphs; a newline inside one becomes a line break. */
|
|
2877
|
+
paragraphs: readonly string[];
|
|
2878
|
+
/** Lists after the paragraphs, such as a digest's records. */
|
|
2879
|
+
sections?: readonly EmailSection[];
|
|
2880
|
+
/** A button after the body, with its link to copy underneath. */
|
|
2881
|
+
button?: {
|
|
2882
|
+
label: string;
|
|
2883
|
+
url: string;
|
|
2884
|
+
};
|
|
2885
|
+
/** A neutral callout under the button, such as a link's lifetime. */
|
|
2886
|
+
notice?: string;
|
|
2887
|
+
/** Small print at the end of the card. */
|
|
2888
|
+
footerNote?: string;
|
|
2889
|
+
/** The app's base URL: the default logo's host, and the host every link must be on. */
|
|
2890
|
+
appUrl: string;
|
|
2891
|
+
/** Named in the logo's alt text and the footer (default: "App"). */
|
|
2892
|
+
appName?: string;
|
|
2893
|
+
branding?: EmailBranding;
|
|
2894
|
+
}
|
|
2895
|
+
/** A titled list in an {@link EmailContent}; each `url` must be on the app's host. */
|
|
2896
|
+
interface EmailSection {
|
|
2897
|
+
title: string;
|
|
2898
|
+
url?: string;
|
|
2899
|
+
rows: readonly {
|
|
2900
|
+
text: string;
|
|
2901
|
+
url?: string;
|
|
2902
|
+
}[];
|
|
2903
|
+
}
|
|
2904
|
+
/**
|
|
2905
|
+
* Render a consumer's own email in the template the auth emails use, so it matches them and
|
|
2906
|
+
* follows their branding. Every value is plain text and escaped here; every URL must be http(s)
|
|
2907
|
+
* on `appUrl`'s host or a subdomain.
|
|
2908
|
+
* @throws If a URL is not http(s) on `appUrl`'s host, or the logo size is invalid
|
|
2909
|
+
*/
|
|
2910
|
+
declare function renderEmail(content: EmailContent): string;
|
|
2911
|
+
|
|
2850
2912
|
type EmailEventsTable$1 = PgTableWithColumns<any>;
|
|
2851
2913
|
type UsersTable = PgTableWithColumns<any>;
|
|
2852
2914
|
/**
|
|
@@ -2882,4 +2944,4 @@ declare function calculateBounceRate(db: PostgresJsDatabase<Record<string, unkno
|
|
|
2882
2944
|
*/
|
|
2883
2945
|
declare function calculateComplaintRate(db: PostgresJsDatabase<Record<string, unknown>>, emailEventsTable: EmailEventsTable, hoursAgo?: number): Promise<number>;
|
|
2884
2946
|
|
|
2885
|
-
export { AUTH_DEFAULTS, type AccountLockoutTables, type Auth, type AuthConfig, type AuthContext, type AuthDatabase, type AuthSchema, CHALLENGE_TTL_MS, type ChallengePayload, CloudflareEmailAdapter, type DeviceType, type EmailAdapter, type EmailBranding, type EmailChangeConfirmationData, type EmailChangeNotificationData, type EmailChangeTables, type EmailSendOptions, type EmailSendResult, EmailService, type EmailTemplate, type EmailType, type Env, type InferNewSession, type InferNewUser, type InferSession, type InferUser, type InvitationHookUser, type InvitationHooks, MAX_CHALLENGE_ATTEMPTS, PASSWORDLESS_MAX_ATTEMPTS, PASSWORDLESS_TTL_MS, type PasswordResetEmailData, type PasswordlessCodeResult, type PasswordlessLinkResult, type PasswordlessSuccess, type PasswordlessTables, type ProblemDetails, ProblemTypes, ResendAdapter, type ResendEventType, type ResendWebhookPayload, type SendEmailBinding, type SendEmailResult, type SessionData, type SessionTables, type SignupMode, type SvixHeaders, TRUSTED_DEVICE_COOKIE_BASE, TRUSTED_DEVICE_TTL_MS, type TotpVerifyResult, type TwoFactorCodeEmailData, type TwoFactorDisabledEmailData, type TwoFactorEnabledEmailData, type ValidationResult, type Variables, type VerificationEmailData, authRoutes, calculateBounceRate, calculateComplaintRate, cancelEmailChange, checkAccountLocked, checkBreachedPassword, cleanupExpiredPasswordlessChallenges, clearAccountLockout, clearChallengeCookie, clearSessionCookie, clearTrustedDeviceCookie, confirmEmailChange, createAuth, createAuthMiddleware, createChallengeToken, createDeviceToken, createEmailAdapter, createPasswordlessChallenge, createProblemDetails, createSession, csrf, decryptTotpSecret, deleteAllUserSessions, deleteChallengeToken, deleteSession, encryptTotpSecret, extractAppUrl, formatBackupCode, generate2faCodeEmail, generate2faDisabledEmail, generate2faEnabledEmail, generateApiKey, generateBackupCodes, generateCode, generateCodeChallenge, generateCodeVerifier, generateEmailChangeConfirmation, generateEmailChangeNotification, generateFingerprint, generatePasswordResetEmail, generateQrCodeUri, generateSecureToken, generateTotpSecret, generateTraceId, generateVerificationEmail, getAllowedOrigins, getAuthContext, getChallengeCookieName, getClientIp, getKeyPrefix, getMinutesUntilUnlock, getSessionCookieName, getTotpCounter, getTrustedDeviceCookieName, handleWebhookEvent, hashApiKey, hashBackupCode, hashPassword, hashToken, incrementFailedAttempts, invalidateAllUserSessions, isCapacitorApp, isCloudflarePreviewUrl, isDeepLinkUri, isValidApiKeyFormat, logError, logSecurityEvent, logger, normalizeBackupCode, optionalAuth, parseDeviceName, parseDeviceType, passwordlessEmail, problemJson, problems, rateLimit, recentPasswordlessFailures, refreshSession, requestEmailChange, requireAuth, requireVerifiedEmail, retrieveChallengeToken, sessionRefreshDue, setChallengeCookie, setSessionCookie, setTrustedDeviceCookie, storeChallengeToken, updateChallengeAttempts, validateChallengePayload, validateOrigin, validatePassword, validatePasswordWithBreachCheck, validateSession, validateTrustedDevice, verifyBackupCode, verifyCodeChallenge, verifyPassword, verifyPasswordWithRotation, verifyPasswordlessCode, verifyPasswordlessLink, verifyTotpCode, verifyTurnstileToken, verifyWebhookSignature };
|
|
2947
|
+
export { AUTH_DEFAULTS, type AccountLockoutTables, type Auth, type AuthConfig, type AuthContext, type AuthDatabase, type AuthSchema, CHALLENGE_TTL_MS, type ChallengePayload, CloudflareEmailAdapter, type DeviceType, type EmailAdapter, type EmailBranding, type EmailChangeConfirmationData, type EmailChangeNotificationData, type EmailChangeTables, type EmailContent, type EmailSection, type EmailSendOptions, type EmailSendResult, EmailService, type EmailTemplate, type EmailType, type Env, type InferNewSession, type InferNewUser, type InferSession, type InferUser, type InvitationHookUser, type InvitationHooks, MAX_CHALLENGE_ATTEMPTS, PASSWORDLESS_MAX_ATTEMPTS, PASSWORDLESS_TTL_MS, type PasswordResetEmailData, type PasswordlessCodeResult, type PasswordlessLinkResult, type PasswordlessSuccess, type PasswordlessTables, type ProblemDetails, ProblemTypes, ResendAdapter, type ResendEventType, type ResendWebhookPayload, type SendEmailBinding, type SendEmailResult, type SessionData, type SessionTables, type SignupMode, type SvixHeaders, TRUSTED_DEVICE_COOKIE_BASE, TRUSTED_DEVICE_TTL_MS, type TotpVerifyResult, type TwoFactorCodeEmailData, type TwoFactorDisabledEmailData, type TwoFactorEnabledEmailData, type ValidationResult, type Variables, type VerificationEmailData, authRoutes, calculateBounceRate, calculateComplaintRate, cancelEmailChange, checkAccountLocked, checkBreachedPassword, cleanupExpiredPasswordlessChallenges, clearAccountLockout, clearChallengeCookie, clearSessionCookie, clearTrustedDeviceCookie, confirmEmailChange, createAuth, createAuthMiddleware, createChallengeToken, createDeviceToken, createEmailAdapter, createPasswordlessChallenge, createProblemDetails, createSession, csrf, decryptTotpSecret, deleteAllUserSessions, deleteChallengeToken, deleteSession, encryptTotpSecret, extractAppUrl, formatBackupCode, generate2faCodeEmail, generate2faDisabledEmail, generate2faEnabledEmail, generateApiKey, generateBackupCodes, generateCode, generateCodeChallenge, generateCodeVerifier, generateEmailChangeConfirmation, generateEmailChangeNotification, generateFingerprint, generatePasswordResetEmail, generateQrCodeUri, generateSecureToken, generateTotpSecret, generateTraceId, generateVerificationEmail, getAllowedOrigins, getAuthContext, getChallengeCookieName, getClientIp, getKeyPrefix, getMinutesUntilUnlock, getSessionCookieName, getTotpCounter, getTrustedDeviceCookieName, handleWebhookEvent, hashApiKey, hashBackupCode, hashPassword, hashToken, incrementFailedAttempts, invalidateAllUserSessions, isCapacitorApp, isCloudflarePreviewUrl, isDeepLinkUri, isValidApiKeyFormat, logError, logSecurityEvent, logger, normalizeBackupCode, optionalAuth, parseDeviceName, parseDeviceType, passwordlessEmail, problemJson, problems, rateLimit, recentPasswordlessFailures, refreshSession, renderEmail, requestEmailChange, requireAuth, requireVerifiedEmail, retrieveChallengeToken, sessionRefreshDue, setChallengeCookie, setSessionCookie, setTrustedDeviceCookie, storeChallengeToken, updateChallengeAttempts, validateChallengePayload, validateOrigin, validatePassword, validatePasswordWithBreachCheck, validateSession, validateTrustedDevice, verifyBackupCode, verifyCodeChallenge, verifyPassword, verifyPasswordWithRotation, verifyPasswordlessCode, verifyPasswordlessLink, verifyTotpCode, verifyTurnstileToken, verifyWebhookSignature };
|
package/dist/index.d.ts
CHANGED
|
@@ -169,6 +169,9 @@ declare const AUTH_DEFAULTS: {
|
|
|
169
169
|
readonly LOCKOUT_DURATION_MINUTES: 30;
|
|
170
170
|
readonly LOCKOUT_MAX_ATTEMPTS: 5;
|
|
171
171
|
readonly PASSWORD_RESET_TTL_MINUTES: 15;
|
|
172
|
+
readonly EMAIL_VERIFICATION_TTL_HOURS: 24;
|
|
173
|
+
readonly EMAIL_CHANGE_TTL_HOURS: 24;
|
|
174
|
+
readonly TWO_FACTOR_EMAIL_CODE_TTL_MINUTES: 5;
|
|
172
175
|
readonly TWO_FACTOR_CHALLENGE_TTL_SECONDS: 300;
|
|
173
176
|
readonly APP_NAME: "App";
|
|
174
177
|
};
|
|
@@ -248,6 +251,14 @@ interface ResendWebhookPayload {
|
|
|
248
251
|
interface EmailBranding {
|
|
249
252
|
/** Full URL to the header logo. Default: `${appUrl}/email-header-image.png` */
|
|
250
253
|
logoUrl?: string;
|
|
254
|
+
/**
|
|
255
|
+
* Logo width in CSS px. With `logoHeight`, the logo renders at that fixed size with `width`
|
|
256
|
+
* and `height` attributes, so clients reserve its space and Outlook sizes it right. Default:
|
|
257
|
+
* unset, and the logo fills half the email's width.
|
|
258
|
+
*/
|
|
259
|
+
logoWidth?: number;
|
|
260
|
+
/** Logo height in CSS px; required with `logoWidth`. */
|
|
261
|
+
logoHeight?: number;
|
|
251
262
|
/** CTA button background. Default: '#00fe9a' */
|
|
252
263
|
buttonBgColor?: string;
|
|
253
264
|
/** CTA button text color. Default: '#000004' */
|
|
@@ -260,6 +271,11 @@ interface EmailBranding {
|
|
|
260
271
|
footerColor?: string;
|
|
261
272
|
/** Heading and welcome-line color. Default: '#1e1b4b' */
|
|
262
273
|
headingColor?: string;
|
|
274
|
+
/**
|
|
275
|
+
* Marketing site the footer's Privacy Policy (`/privacy`) and Get in Touch (`/contact`)
|
|
276
|
+
* links point at. Default: unset, and the footer has no links.
|
|
277
|
+
*/
|
|
278
|
+
marketingUrl?: string;
|
|
263
279
|
}
|
|
264
280
|
|
|
265
281
|
/**
|
|
@@ -2847,6 +2863,52 @@ declare function generate2faEnabledEmail(data: TwoFactorEnabledEmailData, appNam
|
|
|
2847
2863
|
*/
|
|
2848
2864
|
declare function generate2faDisabledEmail(data: TwoFactorDisabledEmailData, appName?: string, appUrl?: string, branding?: EmailBranding): EmailTemplate;
|
|
2849
2865
|
|
|
2866
|
+
/**
|
|
2867
|
+
* The HTML email template: a white card on a light page, the logo, heading, body, an optional
|
|
2868
|
+
* button with its link to copy, an optional notice, a footer note and the footer band, coloured
|
|
2869
|
+
* from the branding options. Tables and inline styles throughout, and a VML button for Outlook.
|
|
2870
|
+
*/
|
|
2871
|
+
|
|
2872
|
+
/** A consumer's own email, in plain text: {@link renderEmail} escapes every value. */
|
|
2873
|
+
interface EmailContent {
|
|
2874
|
+
/** The heading, also the document title. */
|
|
2875
|
+
heading: string;
|
|
2876
|
+
/** Body paragraphs; a newline inside one becomes a line break. */
|
|
2877
|
+
paragraphs: readonly string[];
|
|
2878
|
+
/** Lists after the paragraphs, such as a digest's records. */
|
|
2879
|
+
sections?: readonly EmailSection[];
|
|
2880
|
+
/** A button after the body, with its link to copy underneath. */
|
|
2881
|
+
button?: {
|
|
2882
|
+
label: string;
|
|
2883
|
+
url: string;
|
|
2884
|
+
};
|
|
2885
|
+
/** A neutral callout under the button, such as a link's lifetime. */
|
|
2886
|
+
notice?: string;
|
|
2887
|
+
/** Small print at the end of the card. */
|
|
2888
|
+
footerNote?: string;
|
|
2889
|
+
/** The app's base URL: the default logo's host, and the host every link must be on. */
|
|
2890
|
+
appUrl: string;
|
|
2891
|
+
/** Named in the logo's alt text and the footer (default: "App"). */
|
|
2892
|
+
appName?: string;
|
|
2893
|
+
branding?: EmailBranding;
|
|
2894
|
+
}
|
|
2895
|
+
/** A titled list in an {@link EmailContent}; each `url` must be on the app's host. */
|
|
2896
|
+
interface EmailSection {
|
|
2897
|
+
title: string;
|
|
2898
|
+
url?: string;
|
|
2899
|
+
rows: readonly {
|
|
2900
|
+
text: string;
|
|
2901
|
+
url?: string;
|
|
2902
|
+
}[];
|
|
2903
|
+
}
|
|
2904
|
+
/**
|
|
2905
|
+
* Render a consumer's own email in the template the auth emails use, so it matches them and
|
|
2906
|
+
* follows their branding. Every value is plain text and escaped here; every URL must be http(s)
|
|
2907
|
+
* on `appUrl`'s host or a subdomain.
|
|
2908
|
+
* @throws If a URL is not http(s) on `appUrl`'s host, or the logo size is invalid
|
|
2909
|
+
*/
|
|
2910
|
+
declare function renderEmail(content: EmailContent): string;
|
|
2911
|
+
|
|
2850
2912
|
type EmailEventsTable$1 = PgTableWithColumns<any>;
|
|
2851
2913
|
type UsersTable = PgTableWithColumns<any>;
|
|
2852
2914
|
/**
|
|
@@ -2882,4 +2944,4 @@ declare function calculateBounceRate(db: PostgresJsDatabase<Record<string, unkno
|
|
|
2882
2944
|
*/
|
|
2883
2945
|
declare function calculateComplaintRate(db: PostgresJsDatabase<Record<string, unknown>>, emailEventsTable: EmailEventsTable, hoursAgo?: number): Promise<number>;
|
|
2884
2946
|
|
|
2885
|
-
export { AUTH_DEFAULTS, type AccountLockoutTables, type Auth, type AuthConfig, type AuthContext, type AuthDatabase, type AuthSchema, CHALLENGE_TTL_MS, type ChallengePayload, CloudflareEmailAdapter, type DeviceType, type EmailAdapter, type EmailBranding, type EmailChangeConfirmationData, type EmailChangeNotificationData, type EmailChangeTables, type EmailSendOptions, type EmailSendResult, EmailService, type EmailTemplate, type EmailType, type Env, type InferNewSession, type InferNewUser, type InferSession, type InferUser, type InvitationHookUser, type InvitationHooks, MAX_CHALLENGE_ATTEMPTS, PASSWORDLESS_MAX_ATTEMPTS, PASSWORDLESS_TTL_MS, type PasswordResetEmailData, type PasswordlessCodeResult, type PasswordlessLinkResult, type PasswordlessSuccess, type PasswordlessTables, type ProblemDetails, ProblemTypes, ResendAdapter, type ResendEventType, type ResendWebhookPayload, type SendEmailBinding, type SendEmailResult, type SessionData, type SessionTables, type SignupMode, type SvixHeaders, TRUSTED_DEVICE_COOKIE_BASE, TRUSTED_DEVICE_TTL_MS, type TotpVerifyResult, type TwoFactorCodeEmailData, type TwoFactorDisabledEmailData, type TwoFactorEnabledEmailData, type ValidationResult, type Variables, type VerificationEmailData, authRoutes, calculateBounceRate, calculateComplaintRate, cancelEmailChange, checkAccountLocked, checkBreachedPassword, cleanupExpiredPasswordlessChallenges, clearAccountLockout, clearChallengeCookie, clearSessionCookie, clearTrustedDeviceCookie, confirmEmailChange, createAuth, createAuthMiddleware, createChallengeToken, createDeviceToken, createEmailAdapter, createPasswordlessChallenge, createProblemDetails, createSession, csrf, decryptTotpSecret, deleteAllUserSessions, deleteChallengeToken, deleteSession, encryptTotpSecret, extractAppUrl, formatBackupCode, generate2faCodeEmail, generate2faDisabledEmail, generate2faEnabledEmail, generateApiKey, generateBackupCodes, generateCode, generateCodeChallenge, generateCodeVerifier, generateEmailChangeConfirmation, generateEmailChangeNotification, generateFingerprint, generatePasswordResetEmail, generateQrCodeUri, generateSecureToken, generateTotpSecret, generateTraceId, generateVerificationEmail, getAllowedOrigins, getAuthContext, getChallengeCookieName, getClientIp, getKeyPrefix, getMinutesUntilUnlock, getSessionCookieName, getTotpCounter, getTrustedDeviceCookieName, handleWebhookEvent, hashApiKey, hashBackupCode, hashPassword, hashToken, incrementFailedAttempts, invalidateAllUserSessions, isCapacitorApp, isCloudflarePreviewUrl, isDeepLinkUri, isValidApiKeyFormat, logError, logSecurityEvent, logger, normalizeBackupCode, optionalAuth, parseDeviceName, parseDeviceType, passwordlessEmail, problemJson, problems, rateLimit, recentPasswordlessFailures, refreshSession, requestEmailChange, requireAuth, requireVerifiedEmail, retrieveChallengeToken, sessionRefreshDue, setChallengeCookie, setSessionCookie, setTrustedDeviceCookie, storeChallengeToken, updateChallengeAttempts, validateChallengePayload, validateOrigin, validatePassword, validatePasswordWithBreachCheck, validateSession, validateTrustedDevice, verifyBackupCode, verifyCodeChallenge, verifyPassword, verifyPasswordWithRotation, verifyPasswordlessCode, verifyPasswordlessLink, verifyTotpCode, verifyTurnstileToken, verifyWebhookSignature };
|
|
2947
|
+
export { AUTH_DEFAULTS, type AccountLockoutTables, type Auth, type AuthConfig, type AuthContext, type AuthDatabase, type AuthSchema, CHALLENGE_TTL_MS, type ChallengePayload, CloudflareEmailAdapter, type DeviceType, type EmailAdapter, type EmailBranding, type EmailChangeConfirmationData, type EmailChangeNotificationData, type EmailChangeTables, type EmailContent, type EmailSection, type EmailSendOptions, type EmailSendResult, EmailService, type EmailTemplate, type EmailType, type Env, type InferNewSession, type InferNewUser, type InferSession, type InferUser, type InvitationHookUser, type InvitationHooks, MAX_CHALLENGE_ATTEMPTS, PASSWORDLESS_MAX_ATTEMPTS, PASSWORDLESS_TTL_MS, type PasswordResetEmailData, type PasswordlessCodeResult, type PasswordlessLinkResult, type PasswordlessSuccess, type PasswordlessTables, type ProblemDetails, ProblemTypes, ResendAdapter, type ResendEventType, type ResendWebhookPayload, type SendEmailBinding, type SendEmailResult, type SessionData, type SessionTables, type SignupMode, type SvixHeaders, TRUSTED_DEVICE_COOKIE_BASE, TRUSTED_DEVICE_TTL_MS, type TotpVerifyResult, type TwoFactorCodeEmailData, type TwoFactorDisabledEmailData, type TwoFactorEnabledEmailData, type ValidationResult, type Variables, type VerificationEmailData, authRoutes, calculateBounceRate, calculateComplaintRate, cancelEmailChange, checkAccountLocked, checkBreachedPassword, cleanupExpiredPasswordlessChallenges, clearAccountLockout, clearChallengeCookie, clearSessionCookie, clearTrustedDeviceCookie, confirmEmailChange, createAuth, createAuthMiddleware, createChallengeToken, createDeviceToken, createEmailAdapter, createPasswordlessChallenge, createProblemDetails, createSession, csrf, decryptTotpSecret, deleteAllUserSessions, deleteChallengeToken, deleteSession, encryptTotpSecret, extractAppUrl, formatBackupCode, generate2faCodeEmail, generate2faDisabledEmail, generate2faEnabledEmail, generateApiKey, generateBackupCodes, generateCode, generateCodeChallenge, generateCodeVerifier, generateEmailChangeConfirmation, generateEmailChangeNotification, generateFingerprint, generatePasswordResetEmail, generateQrCodeUri, generateSecureToken, generateTotpSecret, generateTraceId, generateVerificationEmail, getAllowedOrigins, getAuthContext, getChallengeCookieName, getClientIp, getKeyPrefix, getMinutesUntilUnlock, getSessionCookieName, getTotpCounter, getTrustedDeviceCookieName, handleWebhookEvent, hashApiKey, hashBackupCode, hashPassword, hashToken, incrementFailedAttempts, invalidateAllUserSessions, isCapacitorApp, isCloudflarePreviewUrl, isDeepLinkUri, isValidApiKeyFormat, logError, logSecurityEvent, logger, normalizeBackupCode, optionalAuth, parseDeviceName, parseDeviceType, passwordlessEmail, problemJson, problems, rateLimit, recentPasswordlessFailures, refreshSession, renderEmail, requestEmailChange, requireAuth, requireVerifiedEmail, retrieveChallengeToken, sessionRefreshDue, setChallengeCookie, setSessionCookie, setTrustedDeviceCookie, storeChallengeToken, updateChallengeAttempts, validateChallengePayload, validateOrigin, validatePassword, validatePasswordWithBreachCheck, validateSession, validateTrustedDevice, verifyBackupCode, verifyCodeChallenge, verifyPassword, verifyPasswordWithRotation, verifyPasswordlessCode, verifyPasswordlessLink, verifyTotpCode, verifyTurnstileToken, verifyWebhookSignature };
|