javascriptcookieschromiumsamesitejs-cookie

js-cookie with sameSite None & secure


how do i use js-cookie with sameSite set to none & secure? is this something like this?

Cookies.set("name", "value", {SameSite : "None; secure" });


Solution

  • Just do the following:

      Cookies.set('name', 'value', {
        sameSite: 'none',
        secure: true
      })