File tree Expand file tree Collapse file tree 1 file changed +4
-12
lines changed
Expand file tree Collapse file tree 1 file changed +4
-12
lines changed Original file line number Diff line number Diff line change @@ -127,14 +127,8 @@ export const auth = betterAuth({
127127 minPasswordLength : 8 ,
128128 maxPasswordLength : 32 ,
129129 autoSignIn : false ,
130- requireEmailVerification : true ,
131- sendResetPasswordEmail : async ( {
132- user,
133- url,
134- } : {
135- user : any ;
136- url : string ;
137- } ) => {
130+ requireEmailVerification : process . env . NODE_ENV === 'production' ,
131+ sendResetPassword : async ( { user, url } : { user : any ; url : string } ) => {
138132 const resend = new Resend ( process . env . RESEND_API_KEY as string ) ;
139133 await resend . emails . send ( {
140134@@ -145,10 +139,8 @@ export const auth = betterAuth({
145139 } ,
146140 } ,
147141 emailVerification : {
148- sendOnSignUp : true ,
149- sendVerificationOnSignUp : true ,
150- disableSignUp : true ,
151- sendVerificationOnSignIn : true ,
142+ sendOnSignUp : process . env . NODE_ENV === 'production' ,
143+ sendOnSignIn : process . env . NODE_ENV === 'production' ,
152144 autoSignInAfterVerification : true ,
153145 sendVerificationEmail : async ( {
154146 user,
You can’t perform that action at this time.
0 commit comments