reset-password not working with email link

Hi,

For some reason, my reset password email is not working - I have this code:
import { resend } from "../mail";
import { EmailTemplate } from "@daveyplate/better-auth-ui/server";

...
        sendResetPassword: async ({ user, url }) => {
            const name = user.name || user.email.split("@")[0];
            console.log("url", url);
            await resend.emails.send({
                from: "redacted",
                to: user.email,
                subject: "Reset your password",
                react: EmailTemplate({
                    action: "Reset Password",
                    content: await ResetPasswordEmailTemplate({ name }),
                    heading: "Reset your password",
                    siteName: "redacted",
                    baseUrl: "redacted",
                    url,
                }),
            });
        },
    },


in the email link I see http://localhost:8080/api/auth/reset-password/redacted_token?callbackURL=/reset-password but when i click the button I get a
404 and no redirect to the frontend. I did the same for email verification and that works fine
error: NOT_FOUND
 status: 404,
   code: "NOT_FOUND"

      at NotFoundError (/Users/kevin/code/src/github/efnf/market/node_modules/elysia/src/error.ts:77:3)


Interestingly enough I can hit the endpoint directly through the openapi spec. I am using this guide:
https://better-auth-ui.com/components/email-template

Am I missing something?
CleanShot_2025-04-05_at_10.48.562x.png
Better Auth UI
UI components for the most comprehensive authentication library for TypeScript.
Was this page helpful?