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
- general_route_not_found - Auth Guide
If you’ve just added a subdomain to your project, verified your DNS records, and confirmed your SSL certificate is working, but you're still hitting a `general_...
- Can't resume paused project
I have logged in in incognito, done the email verification and still get the invalid fingerprint error. What's the issue.
- Download appwrite Docs
Is there is a way to download appwrite Docs ? Because appwrite skill isn't enough to give the agent full understanding about how appwrite works (I noticed this ...