updated packages
This commit is contained in:
@@ -135,9 +135,7 @@ class SessionGuard implements StatefulGuard, SupportsBasicAuth
|
||||
// If the user is null, but we decrypt a "recaller" cookie we can attempt to
|
||||
// pull the user data on that cookie which serves as a remember cookie on
|
||||
// the application. Once we have a user we can return it to the caller.
|
||||
$recaller = $this->recaller();
|
||||
|
||||
if (is_null($this->user) && ! is_null($recaller)) {
|
||||
if (is_null($this->user) && ! is_null($recaller = $this->recaller())) {
|
||||
$this->user = $this->userFromRecaller($recaller);
|
||||
|
||||
if ($this->user) {
|
||||
@@ -489,7 +487,7 @@ class SessionGuard implements StatefulGuard, SupportsBasicAuth
|
||||
// listening for anytime a user signs out of this application manually.
|
||||
$this->clearUserDataFromStorage();
|
||||
|
||||
if (! is_null($this->user)) {
|
||||
if (! is_null($this->user) && ! empty($user->getRememberToken())) {
|
||||
$this->cycleRememberToken($user);
|
||||
}
|
||||
|
||||
@@ -552,7 +550,12 @@ class SessionGuard implements StatefulGuard, SupportsBasicAuth
|
||||
$attribute => Hash::make($password),
|
||||
]))->save();
|
||||
|
||||
$this->queueRecallerCookie($this->user());
|
||||
if ($this->recaller() ||
|
||||
$this->getCookieJar()->hasQueued($this->getRecallerName())) {
|
||||
$this->queueRecallerCookie($this->user());
|
||||
}
|
||||
|
||||
$this->fireOtherDeviceLogoutEvent($this->user());
|
||||
|
||||
return $result;
|
||||
}
|
||||
@@ -617,6 +620,21 @@ class SessionGuard implements StatefulGuard, SupportsBasicAuth
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Fire the other device logout event if the dispatcher is set.
|
||||
*
|
||||
* @param \Illuminate\Contracts\Auth\Authenticatable $user
|
||||
* @return void
|
||||
*/
|
||||
protected function fireOtherDeviceLogoutEvent($user)
|
||||
{
|
||||
if (isset($this->events)) {
|
||||
$this->events->dispatch(new Events\OtherDeviceLogout(
|
||||
$this->name, $user
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Fire the failed authentication attempt event with the given arguments.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user