Skip to content
Back

auth

  • 0
  • Auth
  • Web
tonymelony
26 Mar, 2025, 13:59

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:

TypeScript
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

TL;DR
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.
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