I’ve had an issue for a long time that I haven’t been able to solve (until I found a thread on here). Patrons report that when they close their browser, they must re-authenticate with Patreon to view gated content on my website. And it’s not only when they close their browsers, but also some report that this is the case when they simply wait around a day, even when leaving their browsers open. These reports come from users with different browsers and different levels of personal security.
I have almost no plugins on my website, and almost certainly nothing that would impact a very routine expectation such as a login to persist for more than a few hours. I have reached out to Wordpress to see if I have anything set that could prevent cookie persistence, but I don’t think I ever got my point across well.
It’s frustrating for users, and I was re-inspired to do some digging until I found this thread: Users having to log in with Patreon constantly - #2 by Zanaras
I found 3 instances of the function “wp_set_auth_cookie()” in the plugin file: patreon_login.php. Since I was unsure which instance the user in that thread changed (he did not mention there being 3 instances), I modified the file as he had tried (though I typically don’t like editing plugin files myself) but changed all 3 instances.
And sure enough, users are now reporting that the problem has been solved. What a relief.
But before I rush off in excitement, I want to find out: is what I’ve been experiencing common? And should I have tried to solve it this way (which feels like a hack), or is there another way I should have tried to fix this?