Thank you @dorilama for confirming I’m not crazy to believe it used to work as it would be expected to work. Makes me feel a bit better about my memory.
@georgecollier I came to find this out around 1:45AM last night as I was watching TV, so I went upstairs to test things out. Here is the video of that. Forgive how often I chuckle at the absurdity of this.
Basically what happens, as you explained in another thread or this one, is that when using content type on page that data is fetched on page load, and privacy rules are evaluated at that time, and since Bubble has broken the previously working functionality of re-fetching any necessary dynamic content when the session/user changes, it is not re-fetching the page ‘thing’.
Also, they are not clearing BFCache as they should on logout. That part is a bit ridiculous that they do not, but they have apparently chosen not to. That is a security issue that they should patch up by basically clearing that when a user logs out.
Either way, the sense of it being specifically of using a page as type of thing, that is sort of correct, but not the whole story and demonstrates the buggy/poorly developed features.
In the video above, what I find is that the loading of data as a search/any other expression, is not on it’s owning going to get the data re-fetched when session changes, so as to evaluate again privacy rules. In testing I can see that if we use the content type, there is no mget in network tab, ever. Not on page load, and not after user logs in. This I do not know why, but is likely related to the sense of the data is fetched once and not again.
So first test, was to put a group with a condition to set the data source and use the URL path list item#2 as the source of constraint to search for a ‘thing’ by unique ID. That is all the content type on the page does anyway. This proved that it is not just about using the page type thing. Instead it is a bug in how Bubble looks to the URL path list item #2.
So when I in the video start changing around the unique ID and position of the unique ID in the path list, I find that if I want the expected behavior, I can not use the path list item #2 to hold onto a unique ID. Watch the video, it is funny how ridiculous this is.
The best setup is to not use the content type, put a group to conditionally run the search for the thing by unique ID. Additionally, there must be a path list item #2 that is not a unique ID and instead something else like maybe ‘en’, and to put the unique id as path list item #3. With this setup the user can hit the page without being logged in, have the data protected twice (once with conditional to load the data source based on ‘current user is logged in’ and second by the privacy rules), then when the login from that same protected page with it’s own unique URL for the specific ‘thing’ to protect is completed, the data is fetched, privacy rules evaluated against the new user, and data is immediately available without a page refresh. Then on log out, the data is removed and is not left in BFCache so no concern about using the browser back button and still having the protected data visible.
Bubble needs to fix this as it is a security concern and they should just revert to previous behavior of updating the data on login/logout.
@DjackLowCode @akamarski I tagged you both here as you might be interested in the findings. It does have to do with BFCache, but to get desired behavior we do not need to do separate auth page and redirects.