vue-cookie icon indicating copy to clipboard operation
vue-cookie copied to clipboard

get method doesn't works correctly

Open giolf opened this issue 7 years ago • 7 comments

If i add a new cookie by the setmethod then with the getmethod i can fetch it.
BUT if i use the getmethod to fetch a cookie that already exist (so i din't use the setmethod). In that case the getmethod doesnt find anything!

giolf avatar May 14 '17 14:05 giolf

Was just about to come here and report the same thing. Is this actually a known issue ?

pqt avatar Jul 11 '17 21:07 pqt

@AustinPaquette, unfortunately, I don't think so.

giolf avatar Jul 12 '17 15:07 giolf

Hi guys I have experienced the same thing too, and came here to see its been logged as an issue. From the silence from the Author, looks like no solution in sight yet.

stevepop avatar Aug 16 '17 19:08 stevepop

Had this same issue when setting cookies from server. After searching I realised the cookies were set with HttpOnly flag as true, since it was default. After changing it to false, I was able to fetch it using the get method.

Be sure the same isn't happening to you guys.

ivolimasilva avatar Sep 18 '17 14:09 ivolimasilva

@ivolimasilva, Fixed mine as well by setting HttpOnly to false.

stevepop avatar Sep 18 '17 18:09 stevepop

It works for me as well. It should be closed. 😌

austinfelipe avatar Oct 26 '17 14:10 austinfelipe

I'm still having the problem, having tried two different packages.

app.use(
  session({
    name: 'sessionName',
    secret: process.env.SESSION_SECRET,
    saveUninitialized: true,
    resave: false,
    httpOnly: false,
    cookie: {
      secure: false
    }
  })
)

Any ideas?

OctaneInteractive avatar Aug 25 '19 10:08 OctaneInteractive