I'm currently setting an array of tokens in a user's session on a laravel site, and the session successfully sets the array (called tokenArray) which shows in the debug bar for the session as expected:
if (!is_null($user) && $user->active) {
Auth::login($user);
Session::put('Tokens',$tokenArray);
return redirect()->intended($this->redirectPath());
}
The issue is that when I logout successfully and get redirected to the sign in page the array of tokens still shows in the session on the debug bar.
I would think it would be destroyed by default but is there a way that I need to flush the array specifically? I have a listener on the logout event, so if I need to I could try something there.
SHould this be cleared by default though?