fix(auth): add explicit types to email handlers

Fix TypeScript implicit any errors in sendVerificationEmail and
sendResetPassword handlers.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Till-JS 2026-01-26 15:41:00 +01:00
parent 5098250364
commit 2975e5d2a1

View file

@ -98,7 +98,13 @@ export function createBetterAuth(databaseUrl: string) {
* Sends verification email when user registers.
* User must verify email before they can log in.
*/
sendVerificationEmail: async ({ user, url }) => {
sendVerificationEmail: async ({
user,
url,
}: {
user: { email: string; name: string };
url: string;
}) => {
await sendVerificationEmail(user.email, url, user.name);
},
@ -111,7 +117,13 @@ export function createBetterAuth(databaseUrl: string) {
*
* @see https://www.better-auth.com/docs/authentication/email-password#password-reset
*/
sendResetPassword: async ({ user, url }) => {
sendResetPassword: async ({
user,
url,
}: {
user: { email: string; name: string };
url: string;
}) => {
await sendPasswordResetEmail(user.email, url, user.name);
},
},