Cookie properties with `document.cookie` vs `cookieStore.get`

Viewed 143

If I set a cookie with certain properties using document.cookie, they are reported back to me if I access the cookie with cookieStore.get, but not with document.cookie:

    document.cookie = ">>>Test123=Hello there; Secure; SameSite=Lax";
    console.log(document.cookie);
    cookieStore.get(">>>Test123").then(console.log);

document.cookie gives:

>>>Test123=Hello there

cookieStore.get gives:

{
  domain:null,
  expires:null,
  name:">>>Test123",
  path:"/834420",
  sameSite:"lax",
  secure:true,
  value:"Hello there"
}

Is there a way to get the information on, for instance, the SameSite property of a cookie without using cookieStore?

I've got the code here: https://playcode.io/834420/ if it helps

0 Answers
Related