Issue with security provider and browser cache

The login works perfectly after clearing the browser cache. And I can return days later and still be logged in. The issue is if I log out and then try to log in again, it passes the security but bounces me back to the login page. If I then clear the cache, it lets me go to the account page without needing to log in again.

Cookie options are:

Might be related to the same site cookie settings try inspecting the cookies in the dev tools to see what is going on.

It doesn’t look like a cookies issue and when I clear the browser cache, I’m only clearing the images and files, not the cookies. And if I manually delete the cookies it doesn’t fix it.

This has been working fine for months and only started causing an issue in the last few weeks.

Try setting the secure on when using same site none:

  • Cookies with SameSite=None must now also specify the Secure attribute (they require a secure context/HTTPS).

I’ve made those changes but it’s not made any difference.

Try to set the cookie settings with same site none, secure and also expire other than 30 days

No difference I’m afraid:

I don’t think it’s the cookie. The cookie works perfectly when I clear the browser cache of just files and images and I don’t need to log in again.

How do you do the redirect them?

I have a flow on success of the login api:

Screenshot 2021-12-18 at 12.24.32

It enables me to redirect to the page they were on prior to logging in.

Has this issue been resolved? My site is experiencing the same issue since the same update and still not fixed in 4.5.2.

Yep, I believe it was fixed in the last couple of versions. Provider.php was the script which needed changing. Are you on PHP?

I am on PHP but the latest version hasn’t resolved my issue. More specifically, my site implements the security provider and was working fine last year. I think the latest version I had been using prior to the problem was 4.4.5. When I updated to 4.5.1, the login procedure broke - and 4.5.2 didn’t correct the issue. When I use Google Chrome developer’s pane to view the problem, I only see that the security provider kicks a 500 error… but no other information. I apologize if my response isn’t insightful. I’m more than happy to provide more specifics if desired. Thank you for your feedback, suggestions, etc.

That sounds like a different issue. I had the login working successfully but the redirect was failing due to caching on the server. They introduced a fix to clear the cache.

I think you are absolutely correct. I was hoping that is was “related”. Thank you again!

Please check:

1 Like

I am going to do that and will let you know what I discover. Thank you!

You are truly awesome! I followed your instructions and found the following:

“Call to undefined method lib\core\Session::regenerate()”

So then I googled that, and found YOUR solution provided to another user. More specifically,

I had to delete the local dmxConnectLib folder and resave any server action, which then rebuilt the folder, uploaded it to my server, and BAM… problem solved.

Thank you so much! By the way… for newbies like me… it may be helpful to inform users that the first thing to do after performing an upgrade is to “rebuild” directories that you deem critical. Just a thought.

2 Likes