signIn.email({
email: values.email,
password: values.password,
callbackURL: "/dashboard",
fetchOptions: {
headers: {
"x-captcha-response": turnstileToken
},
onResponse: () => {
setLoading(false);
},
onRequest: () => {
setLoading(true);
},
onError: (ctx) => {
if (ctx.error.status === 403) {
toast.error(`You need a verified email address to login, an email has been sent to you.`);
} else {
toast.error(ctx.error.message);
}
},
onSuccess: () => {
toast.success("Login successful, redirecting...");
},
},
});
signIn.email({
email: values.email,
password: values.password,
callbackURL: "/dashboard",
fetchOptions: {
headers: {
"x-captcha-response": turnstileToken
},
onResponse: () => {
setLoading(false);
},
onRequest: () => {
setLoading(true);
},
onError: (ctx) => {
if (ctx.error.status === 403) {
toast.error(`You need a verified email address to login, an email has been sent to you.`);
} else {
toast.error(ctx.error.message);
}
},
onSuccess: () => {
toast.success("Login successful, redirecting...");
},
},
});