Back

LOG [Error: AppwriteException: User (role: guests) missing scope (account)]

  • 0
  • Auth
HmongDev
7 May, 2024, 19:28

I'm following a youtube tutorial: https://www.youtube.com/watch?v=ZBCUegTZF7M&t=7635s&ab_channel=JavaScriptMastery

and am gettin this error.

My instinct is to add Guest role, but the tutorial doesn't specify doing so in order to log in.

Any help would be appreciated.

TL;DR
Error message indicates that the developer is missing a specific scope (account) for the user role (guests). The issue arises during sign-in even though the user is created in the database. The permissions in `Storage` settings are configured for guest roles only. The mentioned tutorial doesn't provide clear guidance on adding the Guest role for logging in. The potential solution would be to add the required scope (account) to the Guest role to resolve the error.
HmongDev
7 May, 2024, 19:30

In my Storage settings is the only permissions where I'm setting guest role

HmongDev
7 May, 2024, 19:47

User is already created in database, but trying to sign in results in this error

HmongDev
7 May, 2024, 19:48

Here's my code:

TypeScript
    // Sign In
    export async function signIn(email, password) {
        try {
            const session = await account.createEmailSession(
                email,
                password
            );

            return session;
        } catch (error) {
            throw new Error(error);
        }
    }
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more