BUG SOLVED!: Maintaining Authentication after browser shutdown

I actually found several other topics about this exact same thing and fortunately, a kind soul actually offered up some code to create a plugin to do this rather than manual editing (this is much better than having to edit the code every time there’s an update haha).

What I’d LOVE to see is for them to take this and just make it an option in the Patreon plugin itself because this is just going to happen sometimes. It doesn’t really matter if another plugin causes it or some server setting you have causes it because if you need those things to work that way anyway, you need this to be an option, right? I completely understand when the developer says “hey your environment is causing this” but the fact of the matter is, I can’t change it. I have what I have for whatever reasons and I can’t start disabling other plugins or changing my PHP settings. Also even if this worked as it is supposed to, the option to set the remember me setting is still preferable because it will ALWAYS last longer than the session method that was used in the plugin (and because if you have this issue it is fixed by that option).

I used that other guy’s code and then some more code to extend logins to 30 days (the time before a token refresh is required with Patreon). Should make things easier on my users!

Sorry I know this is quite verbose, but to address the session cookies in general, they are supposed to delete on browser exit so this is not actually surprising behavior.

Expires=<date> Optional

Indicates the maximum lifetime of the cookie as an HTTP-date timestamp. See Date for the required formatting.

If unspecified, the cookie becomes a session cookie. A session finishes when the client shuts down, after which the session cookie is removed.

Warning: Many web browsers have a session restore feature that will save all tabs and restore them the next time the browser is used. Session cookies will also be restored, as if the browser was never closed.

When an Expires date is set, the deadline is relative to the client the cookie is being set on, not the server.