I configured everything according to the README, but it doesn't seem to work for me. The user needs to login everytime the browser is restarted.
My guess is that it's because the cookie_lifetime is set to 0 in the services.yml. If I set it back to 2000000 then it works, but the README says I should set it to 0. Am I missing something here?
Also, I found a similar issue opened for the 7.x-1.x-dev version, but I have the same problem with Drupal 8.4.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | persistent_login_issue_return_after_closing_browser.png | 40.83 KB | keszthelyi |
| #3 | persistent_login_issue_login.png | 35.85 KB | keszthelyi |
Comments
Comment #2
gapplecookie_lifetimeaffects the session cookie, which should be cleared by the browser when closed, and is regenerated when returning to the site.The persistent login cookie is set with a longer lifetime, according to the value configured in the module settings.
In order to debug this issue, I'll need to see the headers of the requests and responses:
The response should set the persistent login cookie
The request should include the persistent login cookie value
The response should update the persistent login cookie value
Can you also verify that after logging in, a new entry is added to the persistent login table in the database?
Comment #3
keszthelyi commentedThank you for the help. I created two screenshots of the header info. The first is after login (there's a redirect after the user logs in). The second is when I revisit the page after closing and opening the browser.
I can confirm that the new entry is created in the persistent login table.
Hope this helps, let me know if you need something else.
Comment #4
gappleThe first screenshot truncates the 'Set-Cookie' header value, which should include the persistent login cookie, so it's not possible to determine if it's an issue with the module not setting the cookie, or with the browser not retaining the cookie value properly. The 'cookie' tab should show both the session and persistent login cookie being set in the response after logging in, and on any further requests to the site.
Comment #5
gapple