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
- Help
- Realtime: Listener not triggered on upda...
I self host appwrite 1.8.1. The genereal functionallity works fine. But my realtime subscription isn't updating. I see "Received heartbeat response from realtim...
- Impossible to get USER after createEmail...
Am using provider to deal with functions linked to appwrite. Here is my login. Future<String?> login(String email, String password) async { try { aw...