I am using tiny-cookie for saving language of 2 different projects like, abc.dev.example.com and xyz.dev.example.com as below
setCookie('language', lang)
As projects are running on localhost:3000 and localhost:8000 in dev environment locally; in the chrome debugger, for cookies domain, as shown, the domain is same i.e. localhost see screenshot below (same for localhost:3000)
Now, When i Switch to localhost:3000, I am getting the language as to be tr which is intended. But, when I deploy the projects on their domains; the language is saving and showing in chrome application area but domains are different.
How to solve this issue so that it start working. I have also tried to edit the Domain for both urls (I make it .dev.meeraspace.com in chrome application) to be the same and it then start working. I have also tried below code in both projects like
setCookie('language', lang, { domain: '.dev.example.com' })
setCookie('language', lang, { domain: '.dev.example.com' })
Can anyone face such issue? Please, help. Thanks