
Hey, how should I work with the two SDK
I'm using Nextjs so al the authentication process is made with the node-sdk
but there are some queries to the database I need to do with the client SDK
Currently I'm doing:
const sessionClient = () => {
const session = getCookie(SESSION_COOKIE_TOKEN);
return new Client()
.setEndpoint(Server.endpoint || "")
.setProject(Server.project || "")
.setSession(session || "");
}
const client = sessionClient();
const databases = new Databases(client)
However when I do a request I got an error 401
When I see the the request headers I see the session token (see the image), what I'm doing wrong?
Recommended threads
- not getting cookie in header of appwrite...
my website working locally and on vercel , but when hosting on appwrite sites the main core issue is its not getting the cookie . <@743532656767270934> help
- custom domain failing
I have an appwrite app at a subdomain myapp.topdomain.com. I want to configure the appwrite endpoint to use a 2nd level subdomain e.g. api.myapp.topdomain.com. ...
- Adding rate limits using SSR
Hey, I am using Nuxt and doing Auth server side, I was wondering how I would do rate limiting since the requests would be coming from the same ip.
