This also worked for me
rajab natshah → credited sara101 → .
sara101 → created an issue.
After doing some debugging I found that preventAutologout eventListener was not getting triggered no matter what a user does. This was my solution which seems to work and resolve all the issues experienced.
- document.body.addEventListener('preventAutologout', function (event) {
+ document.addEventListener('preventAutologout', function (event) {
I've seen this issue as well but only when I have multiple tabs open. I'm getting logged out while I'm active and have multiple tabs open which was suppose to be fixed on the dev branch but I'm still seeing issues.
This issue seems old and abandoned but is similar to a problem I'm facing.
So admin users have permissions to view unpublished content.
If the admin user unpublished content and an unauthenticated user was first to visit the jsonapi node endpoint, then the unauthenticated user would not load content as expected.
But…
If the Admin user is the first to visit the jsonapi node endpoint after unpublishing the node, then unauthenticated users visiting same endpoint can also see the unpublished data until I manually clear cache(not expected)