I implemented authentication using JWT, the cookie options are written as below
expires: new Date( Date.now() + process.env.JWT_COOKIE_EXPIRES_IN * 24