Skip to content

Add Forgot Password and Password Reset for admin accounts#18

Draft
Copilot wants to merge 2 commits into
masterfrom
copilot/add-forgot-password-reset
Draft

Add Forgot Password and Password Reset for admin accounts#18
Copilot wants to merge 2 commits into
masterfrom
copilot/add-forgot-password-reset

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 21, 2026

No mechanism existed for admin/commissioner accounts to recover access when their password was lost. This adds a self-service password reset flow to the Admin login screen.

Changes

Data layer

  • IComissionerRepository / ComissionerRepository: new ResetPasswordAsync(username, fullName, newPassword) — looks up account by username + full name, updates BCrypt-hashed password on match

Service layer

  • IElectionConfigurationService / ElectionConfigurationService: exposes ResetPasswordAsync delegating to the repository

UI

  • ResetPasswordWindow (new): collects Username, Full Name, New Password, Confirm Password; validates inputs and password match (StringComparison.Ordinal); surfaces generic error on DB failure (no raw exception leakage)
  • AdminLoginWindow: added "Forgot Password?" button that opens ResetPasswordWindow
  • App.xaml.cs: registers ResetPasswordWindow in the DI container

Reset flow

User enters their username + full name as identity verification → if matched, password is updated with a new BCrypt hash → success dialog prompts re-login.

Identity verification relies on username + full name since the application has no email infrastructure. This is consistent with the existing security posture of the system.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • av-build-tel-api-v1.avaloniaui.net
    • Triggering command: /usr/share/dotnet/dotnet dotnet exec --runtimeconfig /home/REDACTED/.nuget/packages/avalonia.buildservices/11.3.2/tools/netstandard2.0/runtimeconfig.json /home/REDACTED/.nuget/packages/avalonia.buildservices/11.3.2/tools/netstandard2.0/Avalonia.BuildServices.Collector.dll (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Forgot Password and Password reset</issue_title>
<issue_description>Forgot Password and Password reset</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: duhowise <17531922+duhowise@users.noreply.github.com>
Copilot AI changed the title [WIP] Add forgot password and password reset functionality Add Forgot Password and Password Reset for admin accounts Feb 21, 2026
Copilot AI requested a review from duhowise February 21, 2026 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Forgot Password and Password reset

2 participants