What does the "User Preferences" feature mean in the "Auth" section of Appwrite? I am currently creating a feature for my front-end web app, and would like users to be grouped into two groups.. "entrepreneur" or "coach". Would the "User Preferences" feature be used for this sort of user grouping?
The User Preferences is a json object that can have a size of up to 64kb that can hold any user-relate information.
For example it can be used for saving common insensitive user details, as
- Preferred local
- Preferred theme
- Last read article
- etc.
So it could look like this
{
"$id": "5e5ea5c16897e",
"status": true,
"email": "john@appwrite.io",
"phone": "+4930901820",
"emailVerification": true,
"phoneVerification": true,
"prefs": {
"lang":"es",
"theme":"light",
"last_post":"25664eabf",
}
}
I said insensitive as this data is not protected one and can be changed by the user,
If you want to save data like user subscription details, and expire date for example. Then it will be best to create another collection and give each user just the read access.
I have a similar issue @Binyamin, since i also want to be able to direct users into two different types of read access, depending on their user type. So you mean to achieve this, I have to create a second collection and in this collection set the limitations for which screens each user type will be able to read?
Yes, That sounds right Creating a meta data collection letting each user to read only is own data.
Recommended threads
- Push Notification FCM Error
Hello dear people. I tried to integrate Push Notifications into my Flutter App. Everything works fine on Android/iOS Simulator + Testflight but as soon as I s...
- Skip total counts crash the query
Hello, When adding the total parameter (either true, the default, or false) to the listRows function, it raises the following error: `type 'bool' is not a sub...
- Attach Dart debugger for locally deploye...
Hello there, I was wondering if it is possible to attach debugger to dart function, that I run locally. It would make development much easier :-). Thank you.