X
Tap here to go to the mobile version of the site.

Support Forum

express not setting cookies in Firefox but works in Chrome

  • No replies
  • 1 has this problem
  • 4 views
Posted

I have this code below and the cookie sets in chrome but not in firefox This is running locally

app.use(
   session({
     store: new RedisStore({
       client: redis as any
     }),
     name: process.env.COOKIE_NAME,
     secret: process.env.SECRET,
     resave: false,
     saveUninitialized: false,
     cookie: {
       httpOnly: false,
       secure: false,
       maxAge: 1000 * 60 * 60 * 24 * 180
     }
   } as any)
 );
I have this code below and the cookie sets in chrome but not in firefox This is running locally app.use( session({ store: new RedisStore({ client: redis as any }), name: process.env.COOKIE_NAME, secret: process.env.SECRET, resave: false, saveUninitialized: false, cookie: { httpOnly: false, secure: false, maxAge: 1000 * 60 * 60 * 24 * 180 } } as any) );
Quote

Additional System Details

Application

  • User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:67.0) Gecko/20100101 Firefox/67.0

More Information

You must log in to your account to reply to posts. Please start a new question, if you do not have an account yet.