updateEmail abstract method
- required String email,
- required String loginId,
- String? redirectUrl,
- required String refreshJwt,
- UpdateOptions? options,
Updates an existing user by adding an email address.
The email
will be updated after it is verified via enchanted link. In order to
do this, the user must have an active DescopeSession whose refreshJwt
should
be passed as a parameter to this function.
The caller should use the returned EnchantedLinkResponse.linkId to show the user which link they need to press in the enchanted link email, and then use the EnchantedLinkResponse.pendingRef value to poll until the authentication is verified.
You can optionally pass the options
parameter to add the new email address
as a loginId
for the existing user, and to determine how to resolve conflicts
if another user already exists with the same loginId
. See the documentation
for UpdateOptions
for more details.
Implementation
Future<EnchantedLinkResponse> updateEmail({required String email, required String loginId, String? redirectUrl, required String refreshJwt, UpdateOptions? options});