confirmEmailChange method

Future<void> confirmEmailChange({
  1. required String ticket,
})

Confirms an email change.

ticket is the server-generated value that was sent to the user's old email address via requestEmailChange.

Throws an ApiException if confirming the email change fails.

NOTE: This function requires that your project is configured with "NEW EMAIL VERIFICATION" turned ON.

TODO(shyndman): Link to API docs (currently missing)

Implementation

Future<void> confirmEmailChange({required String ticket}) async {
  await _apiClient.post('/change-email/change', data: {
    'ticket': ticket,
  });
}