TypeScript
Uncaught (in promise) AppwriteException: User (role: guests) missing scope (account)
I'm trying to test something related to JWT session this is what i wrote on the web client end
TypeScript
const client = new Client();
client
.setEndpoint('http://localhost/v1')
.setProject('<my-id>')
const account = new Account(client);
async function login() {
await account.createEmailPasswordSession("testing1@gmail.com", "test@123")
}
async function jwt() {
await account.createJWT();
}
async function testing() {
const acc = await account.get();
console.log(acc)
}
login();
jwt();
testing();
setTimeout(() => {
testing();
}, 15000);
I've set the session timeout limit to 10 sec to and set timeout to 15sec to see what I want to check the problem is after 15sec have passed I keep running into the error I posted above any fix for this?
TL;DR
Developers are encountering an error stating "User (role: guests) missing scope (account)" when testing JWT session. The error occurs due to insufficient scope permissions. To resolve this, ensure that the user role has the 'account' scope.Recommended threads