tonymelonyOriginal post
Rank 2: Process
Hey there i have a question i just starded my project, i can register and login, but i don't go to the home page it says:
checkAuth: isAuthenticated - false, error: AppwriteException: User (role: guests) missing scope (account)
at Generator.next (<anonymous>) {
code: 401,
type: 'general_unauthorized_scope',
response: '{"message":"User (role: guests) missing scope (account)","code":401,"type":"general_unauthorized_scope","version":"1.6.2"}'
}
checkAuth: Error message: User (role: guests) missing scope (account)
checkAuth: Error code: 401
checkAuth: Error type: general_unauthorized_scope
My code is:
Register.tsx: https://sourceb.in/7tREH6QNRJ
Login.tsx: https://sourceb.in/kgONFqXAgm
index.tsx/HomePage: https://sourceb.in/wpcQz3L8Sw
Summary
Developers encountered a 401 error where the user is missing the 'account' scope. The issue lies in missing authorization in the code provided in Register.tsx, Login.tsx, and index.tsx/HomePage.
To resolve this, you need to implement the 'account' scope for the 'guests' role in your authentication logic.