import { CookieSerializeOptions } from 'cookie' ; import { isDev } from './isDev' ; const convertYearsToSeconds = ( years ) => { const oneYearAsSeconds = 60 * 60 * 24 * 365 ; return oneYearAsSeconds * years ; } ; export const SAFE_COOKIE_OPTIONS = { path : '/' , maxAge : convertYearsToSeconds ( 5 ) , httpOnly : true , sameSite : 'strict' , secure : ! isDev ( ) , } ;