when i invoke change email from my client ` const UpdateEmail = await axios.post("/api/auth/change-email", { newEmail:values.email }, { withCredentials:true ,baseURL:process.env.NEXT_PUBLIC_SERVER_URL}); ` am always getting this response from the server `2025-10-03T18:07:31.879Z ERROR [Better Auth]: Verification email isn't enabled.` this is my auth betterauth config from my express server `// utils/auth.ts import { betterAuth } from "better-auth"; import { mongodbAdapter } from "better-auth/adapters/mongodb"; import { connectDB } from "./db"; import { createAuthMiddleware, openAPI,organization, username } from "better-auth/plugins"; import { sendEmail } from "./sendEmail"; let authSingleton: ReturnType | null = null; export async function getAuth() { if (authSingleton) return authSingleton; const db = await connectDB(); if (!db) throw new Error("Database not initialized"); authSingleton = betterAuth({ baseURL: process.env.NEXT_PUBLIC_URL, trustedOrigins: [ 'http://localhost:3000', 'http://localhost:4000' ], database: mongodbAdapter(db), emailAndPassword: { enabled: true, requireEmailVerification: true, autoSignIn: false, sendResetPassword: async ({ user, url, token }, request) => { await sendEmail({ to: user.email, subject: "Aqunest : Reset your password", text: `Click the link to reset your password: ${url}`, url, buttonText: `Reset Password` }); } }, // :key: must be globally enabled emailVerification: { enabled: true, sendVerificationEmail: async ({ user, url, token }, request) => { await sendEmail({ to: user.email, subject: "Aqunest - Verify your email address", text: `Click the link to verify your email: ${url}`, url, buttonText: `Verify Email` }); } }, user: { changeEmail: { enabled: true, sendVerificationEmail: async ({ user, newEmail, url, token }, request) => { await sendEmail({ to: newEmail, // :white_check_mark: always new email subject: "Aqunest - Verify your new email address", text: `Click the link to verify your new email: ${url}`, url, buttonText: `Verify Email` }); } }, additionalFields: { role: { type: "string", defaultValue: "user" }, onboarding: { type: "string", defaultValue: "false" } } }, plugins: [openAPI(), organization(), username()], advanced: { cookiePrefix: "Aqunest" } }); console.log( "BetterAuth initialized. Email verification enabled:", authSingleton.options.emailVerification ); return authSingleton; }` i have tried everything nothing is working i have also tried to see if the email verification is enabled and it is true `BetterAuth initialized. Email verification enabled: { enabled: true, sendVerificationEmail: [AsyncFunction: sendVerificationEmail] }` this is my express server.ts `import express from "express" import dotenv from 'dotenv' import bodyParser from "body-parser"; import cookieParser from 'cookie-parser' import MeteringRoutes from './routes/metering-route' import RentalRoutes from './routes/Rental-route' import cors from "cors" import {getAuth} from "./utils/auth" import { fromNodeHeaders, toNodeHandler } from "better-auth/node"; import { connectDB } from "./utils/db"; import "./logger/loggers" import winston from "winston"; dotenv.config(); const ExpressMainLogger = winston.loggers.get('ExpressMainLogger'); const app = express(); const allowedOrigins = [ "http://localhost:3000", "https://your-frontend.com" ]; app.use( cors({ origin: (origin, callback) => { if (!origin || allowedOrigins.includes(origin)) { callback(null, true); } else { callback(new Error("Not allowed by CORS")); } }, credentials: true, }) ); // app.use(bodyParser.json()) // app.use(bodyParser.urlencoded()) // :white_check_mark: parses incoming JSON requests app.use(express.json()); // (if you expect form submissions too) app.use(express.urlencoded({ extended: true })); app.use(cookieParser())//extract cookie from browser const SERVER_PORT = process.env.SMART_METER_PORT connectDB(); app.use("/api/auth", async (req, res, next) => { const auth = await getAuth(); return toNodeHandler(auth)(req, res); }); app.use("/api/metering/",MeteringRoutes); app.use("/api/rental/",RentalRoutes); app.get("/api/me", async (req, res) => { const auth = await getAuth(); const session = await auth.api.getSession({ headers: fromNodeHeaders(req.headers), }); if (!session) return res.status(401).json({ message: "Not logged in" }); res.json(session); }); app.listen(SERVER_PORT,()=>{ ExpressMainLogger.info(`server has started in port ${SERVER_PORT}`) })`