Skip to content

Commit

Permalink
[9.x] Align Remember Me Cookie Duration with CookieJar expiration (#4…
Browse files Browse the repository at this point in the history
…4026)

* [8.x] Align Remember Me Cookie Duration with CookieJar expiration

This PR #43806 changed the max cookie lifetime of the "forever" cookie - these two values are now misaligned.

* Update Test
  • Loading branch information
bogdankharchenko authored Sep 6, 2022
1 parent 0667a88 commit 43622bd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Illuminate/Auth/SessionGuard.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class SessionGuard implements StatefulGuard, SupportsBasicAuth
*
* @var int
*/
protected $rememberDuration = 2628000;
protected $rememberDuration = 576000;

/**
* The session used by the guard.
Expand Down
2 changes: 1 addition & 1 deletion tests/Auth/AuthGuardTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ public function testLoginMethodQueuesCookieWhenRemembering()
$guard = new SessionGuard('default', $provider, $session, $request);
$guard->setCookieJar($cookie);
$foreverCookie = new Cookie($guard->getRecallerName(), 'foo');
$cookie->shouldReceive('make')->once()->with($guard->getRecallerName(), 'foo|recaller|bar', 2628000)->andReturn($foreverCookie);
$cookie->shouldReceive('make')->once()->with($guard->getRecallerName(), 'foo|recaller|bar', 576000)->andReturn($foreverCookie);
$cookie->shouldReceive('queue')->once()->with($foreverCookie);
$guard->getSession()->shouldReceive('put')->once()->with($guard->getName(), 'foo');
$session->shouldReceive('migrate')->once();
Expand Down

0 comments on commit 43622bd

Please sign in to comment.