How can i get email from resetPassword

const { data, error } = await authClient.resetPassword({
      newPassword: password,
      token: token as string,
    });


I want to send email to the user to notify that password is changed. But their is only status in data object. How can i get the email of the user?

This is part of forgotPassword flow.
Solution
Oh just use the token and find the session in your db, and based on that you get the userId, and then you can get the user from that
Was this page helpful?