ยฉ 2026 Hedgehog Software, LLC
export const auth = betterAuth({ database: { dialect, type: "postgres", }, emailAndPassword: { enabled: true, sendResetPassword: async ( { user, token, url }: { user: User; token: string; url: string }, _ ) => { await sendResetPasswordEmail({ email: user.email, url, }); }, resetPasswordTokenExpiresIn: 3600, // 1 hour }, trustedOrigins: ["http://localhost:4321"], });
http://localhost:4321/reset-password/<TOKEN>
BAD_REQUEST
INVALID_TOKEN
const result = await auth.api.resetPassword({ body: { newPassword: password, token, }, });