Skip to content

chore: audit password reset workflow#189

Merged
ManukMinasyan merged 2 commits intomainfrom
chore/audit-password-reset
Mar 19, 2026
Merged

chore: audit password reset workflow#189
ManukMinasyan merged 2 commits intomainfrom
chore/audit-password-reset

Conversation

@ManukMinasyan
Copy link
Copy Markdown
Contributor

Summary

  • Fix bcrypt()Hash::make() in admin EditUser — ensures hashing algorithm consistency across the app. If the default hasher ever changes (e.g., Argon2), admin password resets won't silently use the wrong algorithm.
  • Add password reset test coverage — the entire forgot/reset flow via Filament had zero tests. Added 7 tests covering: page rendering, link request (valid/invalid email), password reset (valid/invalid token), confirmation mismatch, and authenticated redirect guard.

Test plan

  • All 7 new PasswordResetTest tests pass
  • All 31 existing SystemAdmin tests still pass
  • Pint formatting clean

- Replace bcrypt() with Hash::make() in admin EditUser for hashing
  algorithm consistency across the application
- Add comprehensive password reset tests covering the full Filament
  forgot/reset flow: link request, valid/invalid token reset,
  confirmation mismatch, and authenticated redirect
Two browser tests covering the full user-facing password reset journey:
- Navigate from login to forgot password, submit email, see success
- Reset password via signed URL, verify new password works
Copilot AI review requested due to automatic review settings March 19, 2026 15:32
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Audits the password reset workflow in the Filament “app” panel by standardizing admin-set password hashing and adding automated coverage for the forgot/reset flows.

Changes:

  • Add feature tests covering Filament password reset request + reset flows (valid/invalid cases).
  • Add Playwright browser tests for navigating from login to password reset and completing a reset via a valid link.
  • Replace bcrypt() with Hash::make() when an admin updates a user password in SystemAdmin.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
tests/Feature/Auth/PasswordResetTest.php Adds Livewire/Filament feature tests for forgot/reset password flows and edge cases.
tests/Browser/Auth/PasswordResetBrowserTest.php Adds Playwright browser tests for the critical password reset UX paths.
app-modules/SystemAdmin/src/Filament/Resources/UserResource/Pages/EditUser.php Uses Hash::make() when saving an updated password in the admin edit user page.

@ManukMinasyan ManukMinasyan merged commit 2c5b025 into main Mar 19, 2026
14 checks passed
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.

2 participants