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
- Auth activity page is broken
- Appwrite Education Account - Commercial ...
Hello team, Can anyone please confirm me if we are eligible to use the Appwrite Cloud education plan offered to deploy an app and if it started getting moneti...
- Appwrite sites Issue
Hello Appwrite Support, I'm experiencing a connectivity issue with my Appwrite Cloud project hosted in the **Frankfurt (fra)** region. **Project details** * ...