When logged in with specific user (i.e. user 1), I can save my data in form of cookie with following code snippet :
import Cookies from 'universal-cookie';
const cookie = new Cookies()
cookie.set('cookie','user1value', { path:'/'})
But when I login with user 2, I don't want my user 2 to be able to access the cookie that was saved while I was logged in from user 1 i.e. I don't want my user 2 be able to see user1value
cookie given in the code above. The given code allows all the user to access the cookie while being on the same site. Is there a way to map a certain user to specific cookie value? If so, can someone give me a general idea how I can achieve that?