feat: add captcha-backed forum security hardening
This commit is contained in:
@@ -4,6 +4,7 @@ namespace App\Http\Controllers\Auth;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Requests\Auth\LoginRequest;
|
||||
use App\Services\Security\CaptchaVerifier;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
@@ -14,9 +15,17 @@ class AuthenticatedSessionController extends Controller
|
||||
/**
|
||||
* Display the login view.
|
||||
*/
|
||||
public function __construct(
|
||||
private readonly CaptchaVerifier $captchaVerifier,
|
||||
) {
|
||||
}
|
||||
|
||||
public function create(): View
|
||||
{
|
||||
return view('auth.login');
|
||||
return view('auth.login', [
|
||||
'requiresCaptcha' => session('bot_captcha_required', false),
|
||||
'captcha' => $this->captchaVerifier->frontendConfig(),
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user