delete method

Future<void> delete()

Delete the account

Deletes this firebase account. This is a permanent action and cannot be undone. After deleting, the account cannot be used anymore.

If you were listeting to idTokenStream, it will be closed. In addition autoRefresh will be set to false. This method automatically calls dispose(), so you don't have to call it again, but it is ok to do so.

Note: While this operation deletes the firebase account, it does not delete the original account, if an IDP-Provider like google was used. The user can always recreate the account by signing in/up again, but he will receive a new localId and will be treated as completely different user by firebase.

Implementation

Future<void> delete() async {
  await api.delete(DeleteRequest(idToken: _idToken));
  await dispose();
}