Skip to content

Commit

Permalink
Merge pull request #23 from darbor/fixCookieInRememberMe
Browse files Browse the repository at this point in the history
fix get cookie config since ci4.4.0
  • Loading branch information
glewe authored Sep 25, 2023
2 parents 3707677 + a2ded34 commit 30dbc16
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/Authentication/AuthenticationBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ public function rememberUser(int $userID)
//
// Save it to the user's browser in a cookie.
//
$appConfig = config('App');
$cookieConfig = config('Cookie');
$response = service('response');

//
Expand All @@ -295,10 +295,10 @@ public function rememberUser(int $userID)
'remember', // Cookie Name
$token, // Value
$this->config->rememberLength, // # Seconds until it expires
$appConfig->cookieDomain,
$appConfig->cookiePath,
$appConfig->cookiePrefix,
$appConfig->cookieSecure, // Only send over HTTPS?
$cookieConfig->domain,
$cookieConfig->path,
$cookieConfig->prefix,
$cookieConfig->secure, // Only send over HTTPS?
true // Hide from Javascript?
);
}
Expand Down Expand Up @@ -336,7 +336,7 @@ public function refreshRemember(int $userID, string $selector)
//
helper('cookie');

$appConfig = config('App');
$cookieConfig = config('Cookie');

//
// Create the cookie
Expand All @@ -345,10 +345,10 @@ public function refreshRemember(int $userID, string $selector)
'remember', // Cookie Name
$selector . ':' . $validator, // Value
(string)$this->config->rememberLength, // # Seconds until it expires
$appConfig->cookieDomain,
$appConfig->cookiePath,
$appConfig->cookiePrefix,
$appConfig->cookieSecure, // Only send over HTTPS?
$cookieConfig->domain,
$cookieConfig->path,
$cookieConfig->prefix,
$cookieConfig->secure, // Only send over HTTPS?
true // Hide from Javascript?
);
}
Expand Down

0 comments on commit 30dbc16

Please sign in to comment.