Accessing user data for non-logged in users


I’m a newbie bubbler and am loving it.

I have a use case where I want to let a user use my application without logging in, but prompt them to log in after they have completed a few steps on my app . How do I achieve that? How can I track the user’s using session?

My application is on Dev and is being accessed by users, but I cannot find any users on the dev dbase as I am not signing in any users. When I read through bubble documentation I understand that a user is created when the app is accessed, irrespective of a sign up. How do I access the unlogged in user’s info?

I was not able to get a definitive answer to this by searching through the forum, would be great if someone can help me out.

Just refer to the Current User, the same way you would if they were logged in…

Just be aware that if the User does eventually log in, they will then be identified as a different User (the one who has an account, not the previous temporary user), so anything stored in the temporary user data will no longer be accessible.

To get around this issue you’ll probably need to set your own cookies on the User’s browser and run workflows to transfer data from the temp user stored in the cookie to the current User when they login etc.


Just to expound a bit on @adamhholmes’ comments…

As long as a user doesn’t clear cookies (or use a different browser or incognito mode, etc.), their session remains valid for 3 days; so if they create an account within that period of time, no data associated with them is lost - i.e. the “temp” user becomes the “account” on the system.

This behavior is described here in the manual, and my personal experience aligns with what’s documented there.