PHP-024 / Intermediate
Not regenerating the session ID after login (session fixation)
Why is this a problem?
An attacker-chosen session ID remains in use after authentication.
How to fix it
php
if (Auth::attempt($creds)) {
$request->session()->regenerate(); // Replace the session ID
return redirect()->intended('/home');
}