Skip to content

Commit

Permalink
fix: chain filter does not update last_active
Browse files Browse the repository at this point in the history
  • Loading branch information
kenjis committed Aug 12, 2024
1 parent 1034d55 commit 3b67d59
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/Filters/ChainAuth.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,18 @@ public function before(RequestInterface $request, $arguments = null)
$chain = config('Auth')->authenticationChain;

foreach ($chain as $alias) {
if (auth($alias)->loggedIn()) {
$auth = auth($alias);

if ($auth->loggedIn()) {
// Make sure Auth uses this Authenticator
auth()->setAuthenticator($alias);

$authenticator = $auth->getAuthenticator();

if (setting('Auth.recordActiveDate')) {
$authenticator->recordActiveDate();
}

return;
}
}
Expand Down

0 comments on commit 3b67d59

Please sign in to comment.