appwrite / website

The Appwrite website, docs and blog 🏠
https://appwrite.io
213 stars 203 forks source link

📚 Documentation: add `await` to `cookies().get()` as it returns a promise `next.js-ssr-auth` demo #1364

Open hefler opened 1 month ago

hefler commented 1 month ago

💭 Description

On step 3 of the documentation for Server-side authentication with Next.js on line 11 of the sample code:

https://github.com/appwrite/website/blob/b6056496cdee1912c57165b21fecba3a1edbdfeb/src/routes/docs/tutorials/nextjs-ssr-auth/step-3/%2Bpage.markdoc#L23

It might benefit from adding an await on this call, since the method cookies().get() returns a Promise (as per MDN docs).

👀 Have you spent some time to check if this issue has been raised before?

🏢 Have you read the Code of Conduct?