Why verifications table still empty when sign up?

this is my auth config
export const auth = betterAuth({
database: drizzleAdapter(db, {
provider: "pg",
usePlural: true,
}),
plugins: [
organization({
allowUserToCreateOrganization: async (user) => {
return user.emailVerified;
},
}),
],
advanced: {
cookiePrefix: env.NEXT_PUBLIC_PREFIX,
},
emailAndPassword: {
enabled: true,
autoSignIn: false,
requireEmailVerification: true,
sendResetPassword: async ({ user, url }) => {
console.log({ user, url });
},
},
emailVerification: {
sendOnSignUp: true,
sendVerificationEmail: async ({ user, url }) => {
console.log({ user, url });
},
},
});
export const auth = betterAuth({
database: drizzleAdapter(db, {
provider: "pg",
usePlural: true,
}),
plugins: [
organization({
allowUserToCreateOrganization: async (user) => {
return user.emailVerified;
},
}),
],
advanced: {
cookiePrefix: env.NEXT_PUBLIC_PREFIX,
},
emailAndPassword: {
enabled: true,
autoSignIn: false,
requireEmailVerification: true,
sendResetPassword: async ({ user, url }) => {
console.log({ user, url });
},
},
emailVerification: {
sendOnSignUp: true,
sendVerificationEmail: async ({ user, url }) => {
console.log({ user, url });
},
},
});
1 Reply
Fahmi Idris
Fahmi IdrisOP4mo ago
When I check better-auth codebase, sign-up doesn't call createVerificationValue function. I assume this means when registering using email and password, no verification code is needed, but I want to know the reasoning behind why?

Did you find this page helpful?