Level 122
better to be a random value that noone knows than a predictable null
1 like
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I used a Livewire component to log the user out of the system.
namespace App\Livewire\Backend;
use Illuminate\Support\Facades\Auth;
use Livewire\Component;
class Logout extends Component
{
public function logout()
{
Auth::guard('web')->logout();
return redirect()->to('/');
}
public function render()
{
return view('livewire.backend.logout');
}
}
When a user enables the remember_token option, a string is inserted into the remember_token table. Shouldn't this field be truncated when the user logs out?

after logout

I tested it and found that when the user logs out, the remember_token field is not truncated, but rather regenerated. Doesn't this create a security issue? Shouldn't the field be emptied instead?
better to be a random value that noone knows than a predictable null
Please or to participate in this conversation.