deleteMyUser method

  1. @override
Future<void> deleteMyUser({
  1. UserPassword? password,
  2. ConfirmationCode? confirmation,
})
override

Deletes the authenticated MyUser completely.

This action cannot be reverted.

Implementation

@override
Future<void> deleteMyUser({
  UserPassword? password,
  ConfirmationCode? confirmation,
}) async {
  Log.debug(
    'deleteMyUser(password: ${password?.obscured}, confirmation: $confirmation)',
    '$runtimeType',
  );

  await _graphQlProvider.deleteMyUser(
    confirmation:
        confirmation == null && password == null
            ? null
            : MyUserCredentials(code: confirmation, password: password),
  );
}