I am following SSR tutorial from Appwrite in Nextjs 14: https://appwrite.io/docs/products/auth/server-side-rendering
How do I get user details in the middleware?
I can get session cookie, but not sure how do I get the user from it?
TypeScript
const session = request.cookies.get(SESSION_COOKIE);
When I try to initialize Client() from node-appwrite, it throws this error:
TypeScript
node:stream
Module build failed: UnhandledSchemeError: Reading from "node:stream" is not handled by plugins (Unhandled scheme).
Webpack supports "data:" and "file:" URIs by default.
You may need an additional plugin to handle "node:" URIs.
TL;DR
Middleware query on retrieving user details in Next.js using Appwrite tutorial. Developer seeking help on extracting user details from session cookie in middleware. Facing error when initializing `Client()` from `node-appwrite`. Error message: Module build failed due to UnhandledSchemeError.User details in middleware (Next.js)
Recommended threads
- Unknown attribute type: varchar / text
Since the `string` type is deprecated I tried using `varchar` and `text` in some newer tables, but when running `appwrite pull tables && appwrite types ./src/li...
- trying to figure out how to activate my...
please help
- I'm experiencing a critical bug on Appwr...
Hey <@870607367597850624> team / support 👋 I'm experiencing a critical bug on Appwrite Cloud that's blocking my production Flutter app. I've already filed GitH...