The maxAge option in Express's res.cookie() expects a duration in milliseconds, not an absolute timestamp. The previous code was adding `Date.now()` to the validity period, causing cookies to expire decades in the future instead of the intended 1 day / 7 days.
This was particularly problematic on macOS due to stricter cookie handling by Safari/WebKit.
Addresses #5818
Co-authored-by: njg7194 <njg7194@users.noreply.github.com>