Use the composable useChangePassword to change password for the user.
useChangePassword
const { changePassword, isLoading, isSuccess, isError, error } = useChangePassword() watchEffect(() => { console.log(isLoading.value, isSuccess.value, isError.value, error.value) }) const handleFormSubmit = async (e) => { e.preventDefault() await changePassword('my-new-password') }
Was this page helpful?