Skip to content

Commit 9acf541

Browse files
committed
Merge pull request laravel#1255 from joual/develop
Auth token now nulled on logout
2 parents 5a1741e + 3d51200 commit 9acf541

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

laravel/auth/drivers/driver.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,8 @@ public function logout()
127127
$this->cookie($this->recaller(), null, -2000);
128128

129129
Session::forget($this->token());
130+
131+
$this->token = null;
130132
}
131133

132134
/**

laravel/tests/cases/auth.test.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -294,9 +294,6 @@ public function testLogoutMethodLogsOutUser()
294294

295295
Auth::logout();
296296

297-
// A workaround since Cookie will is only stored in memory, until Response class is called.
298-
Auth::driver()->token = null;
299-
300297
$this->assertNull(Auth::user());
301298

302299
$this->assertFalse(isset(Session::$instance->session['data']['laravel_auth_drivers_fluent_login']));

0 commit comments

Comments
 (0)