trying to use user preferences
AppwriteException: User (role: guests) missing scope (account)
at Client.eval (webpack-internal:///(rsc)/./node_modules/appwrite/dist/esm/sdk.js:455:27)
at Generator.next (<anonymous>)
at fulfilled (webpack-internal:///(rsc)/./node_modules/appwrite/dist/esm/sdk.js:46:58)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
code: 401,
type: 'general_unauthorized_scope',
response: {
message: 'User (role: guests) missing scope (account)',
code: 401,
type: 'general_unauthorized_scope',
version: '1.5.10'
}
}```
```ts
async function GetCurrentChat() {
try {
const res = await AppwriteUser.getPrefs();
return res?.['x0-chatID'];
} catch (error: any) {
console.log(error);
return false;
}
}```
the user is authenticated
and it can acces database also it is working fine their
also the current logged in user details were returned
am using OAuth and facing this
the one where i used email otp auth that works fine
every single code is same dude then why this even happens
It's probably a 3rd party cookie problem.
For local development, maybe you can change your browser settings to enable 3rd party cookies.
In production, you'll need to use custom domains
3rd party cookies are allowed
in production am using custom domains
already
uff
Look at the network request in the network logs. Do you see the cookie included in the request?
this is when the page is reloaded
but
this is my code
Recommended threads
- is `account.get()` safe to be used in th...
I want to user's `id` for authentication. However, a while ago I was told in this server not to use `account.get()` and instead add user preferences for that us...
- Appwrite console is too heavy
The Appwrite console is too heavy And all of my services broken Any support , please
- Usage of the new Client() and dealing wi...
Hey guys, just a quick one - we had some web traffic the other day and it ended up bombing out - To put in perspective of how the app works, we have a Nuxt Ap...