🔐 Can someone find out which email addresses are registered in your Laravel application?
With Laravel Fortify's default behavior, potentially yes.
Try registering an existing email address. Request a password reset for an unknown account. Compare the responses.
Different messages and response times can reveal whether an account exists.
Fortify Hardening for Laravel addresses these account enumeration issues while keeping Fortify's existing authentication system.
What changes?
📨 Registration
Existing and unknown email addresses receive neutral responses. Existing account holders can be notified about registration attempts. Registration no longer automatically signs users in.
🔑 Password reset requests
Requests for known and unknown addresses return equivalent responses instead of revealing whether the account exists or a reset was recently requested.
⏱️ Response timing
The package equalizes response timing to reduce information leakage through timing differences.
🛡️ Failed login tracking
Fortify's existing sign-in throttling remains in place, but its rate-limit keys are hashed using the application key instead of exposing email addresses in plaintext.
🧪 Testing
A dedicated Pest/PHPUnit testing helper lets you assert that endpoints respond consistently for registered and unregistered addresses.
The package integrates through Laravel's service container and applies its behavior to Fortify's existing routes.
No replacement authentication system. No separate login flow.
Just additional safeguards around information that authentication endpoints shouldn't disclose in the first place.
Requires Laravel 13+, PHP 8.4+, and Laravel Fortify. MIT licensed.
https://github.com/pushery/fortify-hardening-for-laravel
GitHubGitHub - pushery/fortify-hardening-for-laravel: Prevent account enumeration in Laravel Fortify with neutral registration and password reset responses, timing protection, and account owner notifications.Prevent account enumeration in Laravel Fortify with neutral registration and password reset responses, timing protection, and account owner notifications. - pushery/fortify-hardening-for-laravel
1 other commit about this linkcommit 7fc1c6d