Skip to main content

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​

KeyEnvironment variableDefaultWhat it does
password_reset_link.enabledFORTIFY_HARDENING_PASSWORD_RESET_LINKtrueanswers every reset-link request like a sent link
password_reset.enabledFORTIFY_HARDENING_PASSWORD_RESETtrueanswers every failed reset like a wrong token
registration.enabledFORTIFY_HARDENING_REGISTRATIONtrueputs the neutral registration on Fortify's route
registration.requestRegistrationRequest::classthe form request that validates a registration
registration.redirect_route'login'where a web registration is redirected to
registration.sign_in_route'login'where the notice's button leads
registration.notificationAccountAlreadyExistsNotification::classthe notice the holder of a taken address receives
registration.notice_channels['mail']the channels the notice goes out on
registration.max_mails_per_hourFORTIFY_HARDENING_MAX_MAILS_PER_HOUR1how many mails the registration may send to one address within an hour
timebox.microsecondsFORTIFY_HARDENING_TIMEBOX_MICROSECONDS1000000the minimum duration of a failed sign-in, a reset-link request and a failed reset

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 three enabled switches is off for false, 0, no, off or an empty value, in any case and with spaces around it. Any other value, and a variable that is not set, keeps the section on.

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.

KeyEnglish
fortify-hardening::messages.registration.acceptedWe have sent an email to that address. Please check your inbox to continue.
fortify-hardening::messages.notice.subjectSomeone tried to register with your email address
fortify-hardening::messages.notice.attemptSomeone tried to create an account with this email address, but you already have one.
fortify-hardening::messages.notice.actionSign in
fortify-hardening::messages.notice.nextIf 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.

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