firebase / firebase/friendlyeats-web
NextJS Auth: Where should the session cookie be set
Open
- Dominant language
- JavaScript
- Stars
- 597
- Forks
- 456
- PR merge metrics
- No merged PRs in 30d
Description
From NextJS [docs on authentication](https://nextjs.org/docs/app/guides/authentication#:~:text=Cookies%20should%20be%20set%20on%20the%20server%20to%20prevent%20client%2Dside%20tampering.) it is advised to set the session cookie on the server side. However in this the guide provided here, the cookies are set on the client side. What are the consequences of setting the cookie on client? Is it a security issue?
https://github.com/firebase/friendlyeats-web/blob/6bf6c0e7f3c480c6ec4675814351e5a254ca092c/nextjs-end/src/components/Header.jsx#L17
Contributor guide
Assessment
This issue has not been assessed yet.