Configuration
Every setting has a default, so the package works without a published configuration file. To change a setting that has no environment variable, publish the file:
php artisan vendor:publish --tag=fortify-hardening-config
A published file keeps receiving settings that later releases add, because the package merges its
defaults under it key by key. A list you set, such as notice_channels, stands as you wrote it.
Settings
| Key | Environment variable | Default | What it does |
|---|---|---|---|
password_ | FORTIFY_ | true | answers every reset-link request like a sent link |
password_ | FORTIFY_ | true | answers every failed reset like a wrong token |
registration. | FORTIFY_ | true | puts the neutral registration on Fortify's route |
registration. | RegistrationRequest:: | the form request that validates a registration | |
registration. | 'login' | where a web registration is redirected to | |
registration. | 'login' | where the notice's button leads | |
registration. | AccountAlreadyExistsNotification:: | the notice the holder of a taken address receives | |
registration. | ['mail'] | the channels the notice goes out on | |
registration. | true | whether the notice says that a forgotten password can be reset | |
registration. | FORTIFY_ | 1 | how many mails the registration may send to one address within an hour |
timebox. | FORTIFY_ | 1000000 | the minimum duration of a failed sign-in, a reset-link request and a failed reset |
hashed_ | FORTIFY_ | true | counts failed sign-ins under a hashed key instead of the address and the IP |
A value the package cannot use falls back to its default: a mail budget below one is one, and a
negative minimum duration is the default. A minimum of 0 leaves Laravel's own in place, and a value
your application sets in auth.timebox_duration always wins over the package's. See
Timing for what the minimum covers.
Each of the four enabled switches is off for false, 0, no or off, in any case and with
spaces around it. Any other value keeps the section on, and so does a variable that is not set or set
to nothing, as copying a template of a .env leaves one: each section is a hardening, and an empty
line doesn't drop it.
Switching off the registration takes the package's controller off Fortify's route. The registrar stays available to a controller of your own.
Translations
The answer to a registration and the notice are written in German, English, Spanish, French,
Italian, Dutch and Portuguese, in the application's locale. The answers on the password routes are
Laravel's own and come from your application's passwords translations.
A regional locale reads the catalog of its language: pt-BR and pt-PT read pt, en-GB reads
en, and so does a region nobody listed, such as fr-CA or de_AT. The Portuguese catalog is
written as in Portugal. A catalog you publish for the region under
lang/vendor/fortify-hardening/pt-BR/ wins over the language key by key, so a Brazilian wording
needs only the keys that differ. This holds for the fortify-hardening namespace alone: your own
translations keep Laravel's lookup, which goes from the locale straight to app.fallback_locale.
| Key | English |
|---|---|
fortify-hardening:: | We have sent an email to that address. Please check your inbox to continue. |
fortify-hardening:: | Someone tried to register at :app with your email address |
fortify-hardening:: | Someone tried to create an account with this email address, but you already have one. |
fortify-hardening:: | Sign in |
fortify-hardening:: | If that was you and you have forgotten your password, you can reset it from the sign-in page. If it was not you, there is nothing you need to do. |
fortify-hardening:: | If that was you, you can sign in from the sign-in page. If it was not you, there is nothing you need to do. |
To change a text, or to add a language, publish the translations and edit them in
lang/vendor/fortify-hardening:
php artisan vendor:publish --tag=fortify-hardening-lang