Path: redb-identity/src/redb.Identity.Web/Components/Pages/Admin/UserDetailTabs/UserAccountTab.razor Snapshot: redb-identity, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages. License: Apache-2.0. Repository: https://github.com/redbase-app/redb-identity Page: https://redbase.app/src/dev-2026-12-06/redb-identity/src/redb.Identity.Web/Components/Pages/Admin/UserDetailTabs/UserAccountTab.razor ---- @inject IIdentityClient Client @inject ToastService Toast @inject UndoToastService UndoToast @* User > Account tab — admin-only flags + lifecycle actions. Sections: 1. Status & verification — account status (active/disabled/locked) + email_verified + phone_number_verified flags. Save reuses UpdateUserAsync (single PATCH body). 2. Password — admin override; sends the user a temporary or self-chosen password via ChangeUserPasswordAsync. 3. Danger zone — hard delete with typed-confirm. Soft-disable (status=disabled) uses the UndoToast pattern so an accidental flip can be reverted within 8 s without a server round-trip. *@ @if (_dirty) {
You have unsaved changes.
}

Status & verification

Account status blocked is a manual admin block that rejects every grant type until cleared. pending is the state a freshly registered user sits in until they complete the initial verification flow (typically email).
Skipping the verification flow is an admin override — useful when the operator vouches for the user's email out-of-band.

Password

Admin override — no OldPassword challenge (operator's admin scope is the authorization). All existing sessions for this user are revoked immediately on success; the user must sign in again with the new password.

New password Server-side complexity policy applies (length, banned list, password history). Communicate the new value out-of-band — the user is not notified automatically.

Danger zone

Delete this user

Permanently removes the user, revokes all their sessions, drops MFA factors and federation links, and clears their audit history pointers. This action cannot be undone.

@if (_dirty) { } @if (_error is not null) { @_error }
@code { [Parameter, EditorRequired] public UserResponse User { get; set; } = default!; [Parameter] public EventCallback OnRefresh { get; set; } [Parameter] public EventCallback OnDeleted { get; set; } private string _status = "active"; private bool _emailVerified; private bool _phoneVerified; private string _newPassword = ""; private bool _dirty; private bool _saving; private bool _deleting; private bool _resettingPassword; private string? _error; private UiTypedConfirmDialog? _deleteConfirm; protected override void OnParametersSet() => Reset(); private void Reset() { _status = User.Status ?? "active"; _emailVerified = User.EmailVerified; _phoneVerified = User.PhoneNumberVerified; _dirty = false; _error = null; } private async Task SaveStatusAsync() { if (!_dirty || _saving) return; _saving = true; _error = null; try { await Client.UpdateUserAsync(User.Id, new UpdateUserRequest { Id = User.Id, Status = _status, EmailVerified = _emailVerified, PhoneNumberVerified = _phoneVerified, }); Toast.Success("Account flags updated"); _dirty = false; await OnRefresh.InvokeAsync(); } catch (Exception ex) { _error = ex.Message; Toast.Error(ex.Message); } finally { _saving = false; } } private async Task ResetPasswordAsync() { if (string.IsNullOrEmpty(_newPassword) || _resettingPassword) return; _resettingPassword = true; try { await Client.AdminResetUserPasswordAsync(User.Id, new AdminResetPasswordRequest { Id = User.Id, NewPassword = _newPassword, }); Toast.Success("Password reset — all sessions revoked"); _newPassword = ""; } catch (Exception ex) { Toast.Error(ex.Message); } finally { _resettingPassword = false; } } private async Task DeleteAsync() { if (_deleteConfirm is null || _deleting) return; var name = User.DisplayName ?? User.Login ?? string.Empty; if (string.IsNullOrEmpty(name)) { Toast.Error("User has no display name or login — refusing to delete without a confirm target."); return; } var ok = await _deleteConfirm.ShowAsync( expectedText: User.Login ?? name, title: "Delete user", message: $"This permanently deletes user '{name}' and revokes all their sessions, MFA factors, and federation links. " + $"This action cannot be undone.", confirmLabel: "Delete this user"); if (!ok) return; _deleting = true; try { await Client.DeleteUserAsync(User.Id.ToString()); await OnDeleted.InvokeAsync(); } catch (Exception ex) { Toast.Error(ex.Message); } finally { _deleting = false; } } }