pushery/fortify-hardening-for-laravel
Security hardening for Laravel Fortify. Adds stricter password rules, login throttling and rate limiting, safer session defaults, and optional two-factor enforcement, so your app's authentication is secure out of the box with minimal configuration and no loss of Fortify features.
assertEnumerationSafe() helper now passes Livewire registration forms that answer known and unknown identities alike, and still fails when a field distinguishes them. This turns enumeration safety into an assertion you can run in the test suite instead of a manual review item—useful for a definition-of-done on auth flows.applicationName() hook (via fortify-hardening.registration.notification) lets a single installation serving multiple brands name the correct instance in the notice, and greeting() lets the host address the holder. This supports product decisions around shared infrastructure with per-tenant identity, and around making security emails feel native to the brand.FORTIFY_HARDENING_HASHED_LOGIN_KEYS=false escape hatch allows quick rollback. Notification and assertion changes are non-breaking for existing adopters.LoginRateLimiter that hashes the email/IP pair with the application key before counting. No changes to Fortify’s limit (5/min) or wait behavior. Enabled by default; can be disabled via FORTIFY_HARDENING_HASHED_LOGIN_KEYS=false. Counts reset on deploy because keys change—acceptable for rate limiting, but worth noting in release notes. v0.3.0 adds configurable registration notice behavior (fortify-hardening.registration.notification, notice_mentions_password_reset), a :app translation placeholder, a subclass hook for applicationName()/greeting(), and a reworked assertEnumerationSafe() that normalizes Livewire component IDs, snapshots without checksums, and echoed identities before comparing—while still failing when a response genuinely distinguishes known from unknown identities. The package is small; review the source and tests, and consider pinning to a specific version until it reaches 1.0.assertEnumerationSafe() into the auth test suite.How can I help you explore Laravel packages today?