diff --git a/core/lib/Drupal/Core/Authentication/Provider/Cookie.php b/core/lib/Drupal/Core/Authentication/Provider/Cookie.php index 644104f..955fd38 100644 --- a/core/lib/Drupal/Core/Authentication/Provider/Cookie.php +++ b/core/lib/Drupal/Core/Authentication/Provider/Cookie.php @@ -59,11 +59,11 @@ public function applies(Request $request) { * {@inheritdoc} */ public function authenticate(Request $request) { - if ($session = $request->getSession()) { + $session = $request->getSession(); + if ($session->start()) { // Handle the case of first time visitors and clients that don't store // cookies (eg. web crawlers). - $cookies = $request->cookies; - if (!$cookies->has($session->getName())) { + if (!$this->sessionConfiguration->hasSession($request)) { return new AnonymousUserSession(); }