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
- Error with realtime channels
I'm performing a subscription to realtime channels, and after a few seconds I get an exception with this error: {\"type\":\"error\",\"data\":{\"code\":1008,\"me...
- Which flutter SDK version for Self Hoste...
Hi all, Is there a good way to figure out which version of flutter SDK and Dart SDK is current for latest available self-hosted 1.8.0 ? I know new features are...
- redirect_uri errors on flutter client
Hi all, I'm using the flutter client for my app to do appwrite auth and use the JWTs to send to my backend. When I try to sign in with SSO, I get this: https:/...