@@ -26,6 +26,24 @@ public function register(): void
2626 * Bootstrap any application services.
2727 */
2828 public function boot (): void
29+ {
30+ $ this ->configureActions ();
31+ $ this ->configureViews ();
32+ $ this ->configureRateLimiting ();
33+ }
34+
35+ /**
36+ * Configure Fortify actions.
37+ */
38+ private function configureActions (): void
39+ {
40+ Fortify::resetUserPasswordsUsing (ResetUserPassword::class);
41+ }
42+
43+ /**
44+ * Configure Fortify views.
45+ */
46+ private function configureViews (): void
2947 {
3048 Fortify::resetUserPasswordsUsing (ResetUserPassword::class);
3149
@@ -38,10 +56,6 @@ public function boot(): void
3856 'status ' => $ request ->session ()->get ('status ' ),
3957 ]));
4058
41- Fortify::twoFactorChallengeView (fn () => Inertia::render ('auth/TwoFactorChallenge ' ));
42-
43- Fortify::confirmPasswordView (fn () => Inertia::render ('auth/ConfirmPassword ' ));
44-
4559 Fortify::requestPasswordResetLinkView (fn (Request $ request ) => Inertia::render ('auth/ForgotPassword ' , [
4660 'status ' => $ request ->session ()->get ('status ' ),
4761 ]));
@@ -51,6 +65,16 @@ public function boot(): void
5165 'token ' => $ request ->route ('token ' ),
5266 ]));
5367
68+ Fortify::twoFactorChallengeView (fn () => Inertia::render ('auth/TwoFactorChallenge ' ));
69+
70+ Fortify::confirmPasswordView (fn () => Inertia::render ('auth/ConfirmPassword ' ));
71+ }
72+
73+ /**
74+ * Configure rate limiting.
75+ */
76+ private function configureRateLimiting (): void
77+ {
5478 RateLimiter::for ('two-factor ' , function (Request $ request ) {
5579 return Limit::perMinute (5 )->by ($ request ->session ()->get ('login.id ' ));
5680 });
0 commit comments