requestEmailChange method
Requests an email change for the logging in user.
The backend will send an email to the new email address with an activation link.
NOTE: This function requires that your project is configured with "NEW EMAIL VERIFICATION" turned ON.
Throws an ApiException if requesting the email change fails.
TODO(shyndman): Link to API docs (currently missing)
Implementation
Future<void> requestEmailChange({required String newEmail}) async {
await _apiClient.post(
'/change-email/request',
data: {
'new_email': newEmail,
},
headers: _session.authenticationHeaders,
);
}