updateEmail abstract method
Future<String>
updateEmail({
- 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 for the user identified by loginId
after it is verified via magic link. In order to do this,
the user must have an active DescopeSession whose refreshJwt
should
be passed as a parameter to this function.
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.
Important: Make sure a default magic link URL is configured
in the Descope console, or provided by this call via redirectUrl
.
Implementation
Future<String> updateEmail({required String email, required String loginId, String? redirectUrl, required String refreshJwt, UpdateOptions? options});