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
- Apple OAuth Scopes
Hi Hi, I've configured sign in with apple and this is the response i'm getting from apple once i've signed in. I cant find anywhere I set scopes. I remember se...
- Sign In With Apple OAuth Help
Hi All! I've got a flutter & appwrite app which Im trying to use sign in with apple for. I already have sign in with google working and the function is the sam...
- [SOLVED] OAuth With Google & Flutter
Hi all, I'm trying to sign in with google and it all goes swimmingly until the call back. I get a new user created on the appwrite dashboard however the flutte...