hello, I currently use this code with localstorage
const isAuthenticated = ()=>{
const token = localStorage.getItem(‘token’)
let isValid = true
try{
isValid = decode(token);
}catch(e){
return false;
}
return isValid;
};
I would like to know how it would be the same but with cookies, thanks:)