0

For specific reasons I'm logging the user automatically, and set the remember_me cookie so they stay logged in.

  • They hit a route like my-app.com/my-login?params=XYZ

  • I call Auth::login($user, true);

  • I redirect them to a page where they are logged in

It works everywhere, except on iOS Safari (for some reason). There, it logs in, but doesn't remember the user. However if I refresh the final page just after login, it remembers the user!

Any idea why? How/when is the remember_me cookie set in the HTTP response?

Pathogeny
  • 1
  • 2

1 Answers1

0

10 years from now it was a problem Safari doesn't set Cookie but IE / FF does

Some Safari old versions like (v. 7.0.6) would ignore a cookie. The cookie header looked perfectly fine, almost identical to another cookie which was remembered.

The culprit was the previous cookie header having a malformed expires value. Safari's handling of broken cookie headers is evidently not as robust as that of the other browsers.

So try to use newer safari

Faid
  • 554
  • 1
  • 5
  • 18