From 2975e5d2a12691be3a6aa5243fd129c36f90d490 Mon Sep 17 00:00:00 2001 From: Till-JS <101404291+Till-JS@users.noreply.github.com> Date: Mon, 26 Jan 2026 15:41:00 +0100 Subject: [PATCH] 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 --- .../src/auth/better-auth.config.ts | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/services/mana-core-auth/src/auth/better-auth.config.ts b/services/mana-core-auth/src/auth/better-auth.config.ts index 905b99042..ede5ed104 100644 --- a/services/mana-core-auth/src/auth/better-auth.config.ts +++ b/services/mana-core-auth/src/auth/better-auth.config.ts @@ -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); }, },