I get this error Error getting session: AppwriteException: User (role: guests) missing scope (account)
when running in prod. As soon as I try running my app on my domain, I get this error when trying to login. This is the relevant code https://github.com/byPixelTV/bypixel.dev/blob/main/src/components/auth/AuthSuccessContent.tsx. Everything works fine on localhost, but not when running on my domain or another server in general
TL;DR
Error message `User (role: guests) missing scope (account)` occurs only in production, not in localhost. The issue is likely related to a permission problem with the user roles in the Appwrite SDK. Check the user roles and ensure they have the necessary permissions for accessing the account scope. Review the permissions and scopes set for the 'guests' role. This error can be fixed by adjusting the permissions for the role to include the required 'account' scope.