commit21
This commit is contained in:
@@ -68,6 +68,22 @@ class FortifyServiceProvider extends ServiceProvider
|
||||
'passwordRules' => Password::defaults()->toPasswordRulesString(),
|
||||
]));
|
||||
|
||||
Fortify::twoFactorChallengeView(function () {
|
||||
Inertia::encryptHistory();
|
||||
$response = Inertia::render('auth/two-factor-challenge')->toResponse(request());
|
||||
$response->headers->set('Cache-Control', 'private, no-store, max-age=0');
|
||||
|
||||
return $response;
|
||||
});
|
||||
Fortify::confirmPasswordView(function () {
|
||||
Inertia::encryptHistory();
|
||||
|
||||
$response = Inertia::render('auth/confirm-password')->toResponse(request());
|
||||
$response->headers->set('Cache-Control', 'private, no-store, max-age=0');
|
||||
|
||||
return $response;
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -82,5 +98,7 @@ class FortifyServiceProvider extends ServiceProvider
|
||||
return Limit::perMinute(5)->by($throttleKey);
|
||||
});
|
||||
|
||||
RateLimiter::for('two-factor', fn (Request $request) => Limit::perMinute(5)->by((string) $request->session()->get('login.id').'|'.$request->ip()));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user