Prerequisites
Issue
getCookieOpts() always converts the maxAge property to the expires property by creating a new Date and adding the maxAge to the current server's time. The returned object omits the maxAge property then. I believe this creates issues if the client's time is out of sync and goes against the expected behavior.
What is the rationale behind this design choice? To be honest, I hope the answer is not just "because express does it the same way" 😅