I'm attempting to retrieve information about the currently authenticated user using a GraphQL query on the server. However, I'm encountering a "bad request" error with the message "(role: applications) missing scope (account)." This issue likely arises because I'm performing a server-side operation to fetch user account details, and Appwrite is unable to determine the specific user context for this operation. It seems that I need to include the JWT token from the client when making this query, but I never received a JWT token upon logging in.
Summary
- User is having trouble getting account details through GraphQL in Appwrite server.
- They mention that the createJWT method is not meant for authentication and using an API key with the API call is incorrect.
- User questions how Appwrite determines which user the JWT is associated with.
- When attempting to retrieve information about the currently authenticated user using a GraphQL query, the user encounters a "bad request" error with the message mentioning missing scope (account).
- User suspects that the issue is due to performing a server-side operation and Appwrite not being able to determine the user context.
- User mentions not receiving a JWT token upon logging in.
Solution
debashish
Rank 2: Process
Oct 22, 2023, 06:22
I've noticed in documents there is a GraphQL query to create a JWT, but it doesn't specify the user(account) for whom the JWT is intended. This raises questions about how Appwrite determines which user(account) the JWT is associated with.