I'm trying to get a realtime connection set up in Next.js, in a client side component for "chats." I have tested my code with a collection that has "any" read permissions, and everything works well then, but when there is "users" read permissions on it doesnt. This leads me to believe that the session is not being "sent" when establishing the realtime connection. Does anyone know how to properly do this? (Session in console log is true and the correct session value)
const createClientSessionClient = async (session: any) => {
console.log(`Setting session in createClientSessionClient: ${session ? 'true' : 'false'}`);
const client = new Client()
.setEndpoint(endpoint)
.setProject(project)
.setSession(session);
return {
get account() {
return new Account(client);
},
get databases() {
return new Databases(client);
},
get storage() {
return new Storage(client);
},
get client() {
return new Client().setEndpoint(endpoint).setProject(project).setSession(session);
}
};
};
export { createClientSessionClient, simpleClient };
Also the "get client()" used to only have:
return client
This didnt work either.
Recommended threads
- HTTP Error 500 ''
Hello to everyone, I'm a Flutter developer and actually I'm developing an app using Appwrite.. during my tests and also massive ones I've noticed something we...
- CSV imports were not working but found a...
With 1.9.5 Self-Hosted on a remote Debian 13 VPS I was trying to upload some data using the Import from CSV function. After following the Docs I created a csv f...
- Inviting members while SMTP is disabled ...
Issue: https://github.com/appwrite/console/issues/3125 PR: https://github.com/appwrite/console/pull/3126