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
- No server error on selfhosted appwrite
Please help me, my clients is ask what happen on their data? How can i make it up again?
- Upgrading selfhost version?
It is okay to upgrade version to higher one, of my current version is 1.7.4 to 1.8.1. Is that safe to do cause my clients already have data on that? Also is a...
- Local Serverless Function Testing: Are D...
I have followed the instructions to get the CLI working, and have been able to log-in, initialize my project, and created a simple Python function, which calls ...