Seroga88iOriginal post
Rank 2: Process
Hello guys,
I have a nuxt application where I use the package "nuxt-appwrite": "^1.2.0",
Now I want to login with email and password with this code:
async login(email: string, password: string){
const { account } = useAppwrite()
this.loading = true;
this.loginError = false;
try {
this.session = await account.createEmailPasswordSession(email, password);
this.account = await account.get();
this.loading = false;
} catch (error) {
this.loginError = true;
this.loginErrorMessage = error instanceof AppwriteException ? error.message : 'An error occurred. Please try again later.';
this.loading = false;
}
},
But I get the error User (role: guests) missing scope (account) which is actually strange as the createEmailPasswordSession request works fine and I get a session but the next request fails. Attached is the screenshot where you can see the session informations and the appwriteException and another screenshot shows the request header.
Please let me know what I am doing wrong.
Kind regards
Summary
Developers are encountering a `User (role: guests) missing scope (account)` error when using the nuxt-appwrite package. The `createEmailPasswordSession` request works fine, but the subsequent request fails. To resolve this issue, ensure that the appropriate scopes are set for the user role in the account.