You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{expires: 1,secure: false}// TODO secure: true for production
import{Cookies}from'quasar';importEnvfrom'src/env';/** * This file contains all cookie-related helper functions *//** * Persists a given payload to one or multiple cookies * * @param category - sub-category to store the cookie to * @param payload - the data to persist (in stringified form) */exportfunctionpersistToCookies(category: string,payload: Record<string,any>): void{// Set cookie when SSR fetch is done (i.e. only browser can set a cookie)if(!Env.SERVER){// Set 'secure' to true for productionObject.keys(payload).forEach((key: string)=>{Cookies.set(`${category}.${key}`,JSON.stringify(payload[key]),{expires: 1,secure: false}// TODO secure: true for production);});}}/** * Deletes all cookies within a given category * * @param category - the category within which to delete (e.g. "authentication") */exportfunctiondeleteCookies(category: string): void{constallCookies: Set<unknown>=Cookies.getAll()asSet<unknown>;Object.keys(allCookies).forEach((cookieKey: string)=>{if(cookieKey.startsWith(`${category}.`)){Cookies.remove(cookieKey);}});}
310cadf0b224d2701bbe4236652d23596f8b01c0
The text was updated successfully, but these errors were encountered:
secure: true for production
flox/frontend/src/flox/modules/auth/tools/cookie.helpers.ts
Line 26 in 4d186fe
310cadf0b224d2701bbe4236652d23596f8b01c0
The text was updated successfully, but these errors were encountered: