Overview
Updates the user’s email address.- This function updates the user’s email address and, if provided, verifies it using a verification token (typically from an OTP flow).
- If a userId is provided, it updates the email for that specific user; otherwise, it uses the current session’s userId.
- If a verificationToken is not provided, the email will be updated but will not be marked as verified.
- Automatically ensures an active session exists before making the request.
- Handles session management and error reporting for both update and verification flows.
Package: core
Defined in: core.ts:2693
Parameters
Response
A successful response returns the following fields:A promise that resolves to the userId of the updated user.