Skip to main content

useChangeEmail()

Use the composable useChangeEmail to change email for the user.

const { changeEmail, isLoading, needsEmailVerification, isError, error } =
useChangeEmail()

watchEffect(() => {
console.log(
isLoading.value,
needsEmailVerification.value,
isError.value,
error.value
)
})

const handleFormSubmit = async (e) => {
e.preventDefault()

await changeEmail({
email: 'new@example.com'
})
}

Parameters


options optional NestedRefOfValue<undefined | ChangeEmailOptions>