Recently I was working on a project where my client wanted to have a bilingual Ghost website and since he wanted the full website (including the newsletters) translated into German, I have done a Ghost subdirectory setup for the second language as follows.
One of the challenges I had to go through with this setup is if a member logged in on the English website and try to login into the German version, the cookies responsible for holding the member’s email and signature
ghost-members-ssr.sig are getting replaced by the new login. Hence the member is automatically getting logged out from the English website.
User login to example.com
(Logs in successfully)
User login to the example.com/de/
(Logs in successfully on example.com/de/ but logs out from example.com)
This is obvious as both versions of the website are sharing the same hostname (example.com)
The cookie name is hardcoded in core\server\services\members\service.js and it seems there is no way to generate this dynamically or replaced it in the config file.
Is there any other way to overcome this issue rather than editing the above file (which I will have to do again and again each time I update Ghost) or setting up a custom ghost update service based on a modified Ghost fork?
Any suggestion would be greatly appreciated.