forgotPassword: async ({ email }) => {
const { error } = await supabaseClient.auth.resetPasswordForEmail(
email, { redirectTo: "http://localhost:3000/update-password" }
);
if (error) {
return {
success: false,
error,
};
}
return {
success: true,
};
},
updatePassword: async ({newPassword}) => {
const { data, error } = await supabaseClient.auth.updateUser({password: newPassword,});
if (error) {
return {
success: false,
error,
};
}
return {
success: true,
};
}
forgotPassword: async ({ email }) => {
const { error } = await supabaseClient.auth.resetPasswordForEmail(
email, { redirectTo: "http://localhost:3000/update-password" }
);
if (error) {
return {
success: false,
error,
};
}
return {
success: true,
};
},
updatePassword: async ({newPassword}) => {
const { data, error } = await supabaseClient.auth.updateUser({password: newPassword,});
if (error) {
return {
success: false,
error,
};
}
return {
success: true,
};
}