Back

[SOLVED]: Disabling services for client SDK's also disables the services for `node-appwrite`

  • 0
  • Self Hosted
  • Auth
  • Cloud
Sam K
14 Jul, 2024, 12:28

Hey, is this behaviour correct? when disabling services for client SDK's it also disables the services for node-appwrite?

in the settings description says this:

Choose services you wish to enable or disable for the client API. When disabled, the services are not accessible to client SDKs but remain accessible to server SDKs.

thanks in advance

TL;DR
Disabling services for client SDKs also disables the services for `node-appwrite`. Solution: Enable the services for now as the URL is not visible to the client.
darShan
14 Jul, 2024, 12:36

When disabling services for client SDK's it also disables the services for node-appwrite?

  • Nope, services stay accessible to server sdks. node-appwrite is a server side sdk.
Sam K
14 Jul, 2024, 12:39

so it's disabling it.. let me check the error

Sam K
14 Jul, 2024, 12:41

ACCOUNT ERROR: The requested service is disabled. You can enable the service from the Appwrite console.

darShan
14 Jul, 2024, 12:41

Did you do .setKey on the Client?

Sam K
14 Jul, 2024, 12:42

yes,

Sam K
14 Jul, 2024, 12:43

but then I use the session like so

Sam K
14 Jul, 2024, 12:43

so it respects the permissions and not act like super admin

darShan
14 Jul, 2024, 12:43

afaik, session falls on the client side.

darShan
14 Jul, 2024, 12:43

it should work if you only use setKey.

darShan
14 Jul, 2024, 12:44

can you check if it works with only Key.

Sam K
14 Jul, 2024, 12:44

ok I get it now. It disables the session with appwrite web sdk

Sam K
14 Jul, 2024, 12:45

yes the key works as I can loggin and set the cookie but the server kicks me out coz the middleware is using the session

darShan
14 Jul, 2024, 12:45

Use appwrite for client side.

Sam K
14 Jul, 2024, 12:46

from the description I understood that it disables access thru the web sdk but the keeps the server side even with session.

Sam K
14 Jul, 2024, 12:46

can't do that. project requirements states the backend should be not accessible from the web

Sam K
14 Jul, 2024, 12:47

but that's fine, the workaround is just enable them for now as the url is never visible to the client

Sam K
14 Jul, 2024, 12:47

Thanks for the clarification πŸ™‚

darShan
14 Jul, 2024, 12:47

no worries.

darShan
14 Jul, 2024, 12:48

Pl. mark the title as [SOLVED] if the issue is resolved.

Happy Appwriting :appwritecheers:.

Sam K
14 Jul, 2024, 12:48

[SOLVED]: Disabling services for client SDK's also disables the services for node-appwrite

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