Creating an app where users access only their own data - Firebase backend

Hi Y’all - I’ve read through the forums and tutorials, and I can’t wrap my head around… how to create an app where a user logs in, creates some entries, and then only sees those entries. So, multiple users can use the same app but only see their entries.

Appreciate anyone taking the time to spell it out for me!

Thanks!

I did it like this.
(1) I assume a user name (or other ID) is included in your data; download collection to Appgyver
(2) validate user login
(3) record name (or ID) of logged in user
(4) bind your repeat-with component to the data with a SELECT function (something like this):

SELECT(data.myData,IF(item.fields.name.stringValue == appVars.LoggedInUser,true, false))

The SELECT function filters the data based on the User name. Therefore, they see only the data that they “own”.

1 Like