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
- Status 400 on oauth
Hello, I am getting status 400 on oauth login via google (redirect_uri_mismatch), same with Apple oauth. Is there any issues with oauth authorization currently...
- i need help!
I was working on my project and I just can't stop receiving this message. Is something wrong?
- Confused about the pricing. Can I get so...
I 'm really confused about the pricing here. I've got the pro plan and i have 4 projects open. As you can see, I'm nowhere near my usage limits with these proje...