[Solved] Storing user specific data in firebase

I’ve found a lot of posts around this idea - but none for ThunkableX and the Firebase components seem to differ. I wonder if someone could point me in the right direction. Here’s what I’m trying to achieve.

App starts
Checks for prior use (is this the first time its run)
If not load its userId from a local store
If so generate a unique non clashing userId and send to firebase
Store a user entered variable in Firebase under that user ID

I’m having trouble getting firebase to create items that don’t get immediately overwritten by the next client.

So for example:

This will store only one user: userId - and it is overwritten every time its set. I’d like to store a list of them so I can store data in there.

This seems super basic but I’m a bit stuck!

Its because “user/” is the tag. You need to do something like this

Key = join user/(stored=userName)/registered
value = 1

The value can be a “registration” value. Now you have a sub-dir that you can use for the user, such as password, usage, etc.

Your firebase will be set up like

/user/userid/-- regsitered etc etc.

Does that help?

1 Like

That is extremely helpful, thank you for taking the time to respond.


Well I appreciate the detail and thought in your question. It is an example to others on how to ask a clear question.

2 posts were split to a new topic: Can tags be deleted from Firebase?