PR: Add Admin Password Reset Tool & Overhaul Auth Error UX #49
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR: Add Admin Password Reset Tool & Overhaul Auth Error UX
Summary
This PR introduces a secure admin-side password reset script and significantly improves the frontend authentication experience with accessible form fields, structured error handling, and real-time validation. It also adds unit/integration tests and small service-level safeguards to prevent retry loops. The net effect is safer user management, clearer feedback, and more accessible forms—without changing API contracts.
Problem / Motivation
What’s Changed
1) Backend: New Admin Reset Script
backend/scripts/reset_password.pyhash_password) and DB save.backend/logs/password_reset_audit.logwith timestamp, user, success flag.2) Frontend – New Components
AccessibleFormField.tsxTextField.EnhancedErrorDisplay.tsxPasswordStrengthIndicator.tsx3) Frontend – Login / Registration Flows
Login.tsxauthErrorHandlerfor structured error messages.errorfallback for compatibility.utils/authErrorHandler.ts(new)4) Services
ApiService.ts/auth/loginand/auth/registerrequests.5) Tests
Login.integration.test.tsxauthErrorHandler.test.tsUser-Visible Behavior
Admins can run a secure password reset script with strength checks + logging.
End users see:
No API contract changes; only frontend UX is improved.
Configuration & Ops Notes
Audit log is written to
backend/logs/password_reset_audit.log.Example password reset usage:
Backward Compatibility