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
- It says domain already used but I have d...
I accidentally deleted the project in which I used my domain originally (orexia.app) from name.com. Now I am trying to add it to a different project and it says...
- Is this normal in the self host custom d...
when i try to add custom domain to the project did not see this in 1.8.0 ok when pressed the retry it says "DNS verification failed with resolver 8.8.8.8. Domai...
- No server error on selfhosted appwrite
Please help me, my clients is ask what happen on their data? How can i make it up again?