
So I followed the tutorial here https://appwrite.io/docs/tutorials/sveltekit-ssr-auth/step-1 with my self-hosted instance on v1.5.3. Login works nicely. However if I then try to use the logged in user to read docs from a collection i get an error:
TypeScript
code: 401,
type: 'general_unauthorized_scope',
response: {
message: 'user@example.com (role: users) missing scope (collections.read)',
code: 401,
type: 'general_unauthorized_scope',
version: '1.5.3'
}
}```
I am using the user session client as created in the example here https://github.com/appwrite/demos-for-svelte/blob/74be81a18142be31f7a818f2e58693b2682909ff/server-side-rendering/src/lib/server/appwrite.ts#L18 to call the `db.listDocuments`
I explicitly made sure the collection is set to allow CRUD for `Any` and `Role: Users`. Still I get the error. Is this a bug or am I not supposed to use `node-appwrite` on server-side with a user session client?
TL;DR
Developers followed a tutorial for SSR with Svelte and Appwrite v1.5.3, successfully implemented user login but encountered a 401 error when trying to read docs from a collection. The error indicates missing scope 'collections.read' for the logged-in user. The collection settings seem correct, so the issue might be with using `node-appwrite` on the server-side with a user session client. Further troubleshooting is recommended.Recommended threads
- Having errors migrating to cloud
Project will not migrate compeltely
- 2 Columns still processing since yesterd...
Hey o/ Yesterday (around <t:1758045600:f>), I created a database and added several columns to it. After about 15 minutes, most of the "processing" tags disappe...
- 503 Timeout when Updating or Upserting D...
Hey I’m running into an issue when trying to update or upsert a row in Appwrite. The request hangs for a while and then throws this error: ``` AppwriteException...
