This commit is contained in:
2026-11-03 11:51:44 +02:00
parent badaada043
commit e753f7a0a4
309 changed files with 14537 additions and 529 deletions
+18
View File
@@ -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()));
}
}