I read in the appwrite realtime docs that there is no support for real-time on the server side at the moment. But I need a way to proxy realtime connections for my use ise case.
Basically, I'm looking to use an external Auth service, and the server side APIs to do custom authentication for the endpoints from the client (by disabling direct client side access to the appwrite servics). But for realtime, that doesn't seem to be feasible since it's not possible to connect to the realtime endpoint via API keys. What can I do in this case?
i'm not sure if you can actually use the realtime api if you're not using appwrite's authentication π§ how would you restrict access to certain resources client side?
For server-side, we usually use Appwrite Functions or Webhooks
All of the restrictions are done in custom code. All of the appwrite endpoints are proxied, and client side access is disabled for the services. To access any resource on the client, the client reaches out to the proxy which uses API keys to access the resource on the server directly and it does authentication as needed.
That's how it works
I'm still using Appwrite format though. The Permission
and Role
objects are still used to generate permissions, and the $permissions
property is what's read to determine access rights.
But I do understand that while this works fine for other APIs, doing the same with realtime might not be ideal. So,...
Permissions are ignored when using API key though π§
Yes I know
And that's what I'm taking advantage of
I'm doing the permission check myself and return 401 error when needed, else I'll fetch the resource and send to the client
Ya so since you're doing everything yourself server-side, you won't be able to use our realtime API. You'd have to set up your own websockets and then maybe you can use webhooks to get notified of when to push data through your websocket
Fine, but not cool lol π
Thanks
Recommended threads
- Realtime with multiple connections
I need the Realtime on multiple Collections for diffrent applicational logic. So my question is: Is there a way to have only 1 Websocket connection or do I need...
- Can't login or deploy functions in Appwr...
Hello, since i updatet to the appwrite cli 6.1.0 i can't login or deploy functions with the cli. When i call the command: "appwrite get account --verbose" i ge...
- Create admin user?
I'm not really sure how this is supposed to work, I installed Appwrite through docker-compose and set it up. When I launched the app and went into it, I created...