Skip to content

Commit 307996e

Browse files
committed
Merge branch 'replace_email_verification_with_fortify' into replace_password_reset_with_fortify
# Conflicts: # app/Providers/FortifyServiceProvider.php
2 parents 034974c + 074edb7 commit 307996e

File tree

1 file changed

+28
-4
lines changed

1 file changed

+28
-4
lines changed

app/Providers/FortifyServiceProvider.php

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)