const { NODE_ENV, DOMAIN } = process.env;
// TODO: if no maxAge is passed, none should be set. would mean that the
// value does not need to be deleted each time the cookies need to be removed
export const cookieOptions = (maxAge = 1000 * 60 * 1) => ({
  path: '/',
  domain: DOMAIN,
  sameSite: 'strict',
  httpOnly: ['staging','production'].includes(NODE_ENV!),
  secure: ['staging','production'].includes(NODE_ENV!),
  signed: true,
  maxAge // one minute
})