22
33namespace App \Providers ;
44
5+ use App \Actions \Fortify \CreateNewUser ;
56use App \Actions \Fortify \ResetUserPassword ;
67use Illuminate \Cache \RateLimiting \Limit ;
78use Illuminate \Http \Request ;
@@ -28,19 +29,15 @@ public function register(): void
2829 public function boot (): void
2930 {
3031 Fortify::resetUserPasswordsUsing (ResetUserPassword::class);
32+ Fortify::createUsersUsing (CreateNewUser::class);
3133
3234 Fortify::loginView (fn (Request $ request ) => Inertia::render ('auth/Login ' , [
3335 'canResetPassword ' => Features::enabled (Features::resetPasswords ()),
36+ 'canRegister ' => Features::enabled (Features::registration ()),
3437 'status ' => $ request ->session ()->get ('status ' ),
3538 ]));
3639
37- Fortify::verifyEmailView (fn (Request $ request ) => Inertia::render ('auth/VerifyEmail ' , [
38- 'status ' => $ request ->session ()->get ('status ' ),
39- ]));
40-
41- Fortify::twoFactorChallengeView (fn () => Inertia::render ('auth/TwoFactorChallenge ' ));
42-
43- Fortify::confirmPasswordView (fn () => Inertia::render ('auth/ConfirmPassword ' ));
40+ Fortify::registerView (fn () => Inertia::render ('auth/Register ' ));
4441
4542 Fortify::requestPasswordResetLinkView (fn (Request $ request ) => Inertia::render ('auth/ForgotPassword ' , [
4643 'status ' => $ request ->session ()->get ('status ' ),
@@ -51,6 +48,14 @@ public function boot(): void
5148 'token ' => $ request ->route ('token ' ),
5249 ]));
5350
51+ Fortify::verifyEmailView (fn (Request $ request ) => Inertia::render ('auth/VerifyEmail ' , [
52+ 'status ' => $ request ->session ()->get ('status ' ),
53+ ]));
54+
55+ Fortify::twoFactorChallengeView (fn () => Inertia::render ('auth/TwoFactorChallenge ' ));
56+
57+ Fortify::confirmPasswordView (fn () => Inertia::render ('auth/ConfirmPassword ' ));
58+
5459 RateLimiter::for ('two-factor ' , function (Request $ request ) {
5560 return Limit::perMinute (5 )->by ($ request ->session ()->get ('login.id ' ));
5661 });
0 commit comments