delete method

Future<void> delete()

Deletes already registered users.

Users created by AuthProvider who are registered together with signIn even if register is not executed are also eligible.

すでに登録されているユーザーを削除します。

registerが実行されていない場合でもsignInで合わせて登録が行われるAuthProviderで作成されたユーザーも対象となります。

Implementation

Future<void> delete() async {
  await _initialize();
  final account = active;
  if (account == null) {
    throw Exception(
      "You are not signed in. Please sign in with [signIn] first.",
    );
  }
  final userId = account.get(userIdKey, "");
  _data._removeAccount(userId);
  _activeId = null;
  _data._clearTemporary();
  _data._clearCurrent();
}