I am trying to get and set in my extension using background.js but whenever I run the extension I get the error saying that referenceError: localStorage is not defined.
whereas if I use it in my App.js , it is getting and setting in the local storage.
Note: I am using manifest v3
chrome.cookies.get(
{ url: "https://www.xxxx.com/", name: "abc" },
async (cookie) => {
const cookieValue: any = cookie?.value;
oldJwtToken = localStorage.getItem("abc");
console.log(cookieValue);
console.log(oldJwtToken);
}