For some automated work, I have to combine the MultiLogin Google Chrome extension (unfortunately removed at this point from the Chrome WebStore) with an extension of mine. The MultiLogin extension creates cookie containers for each tab open, so I can be logged into services with multiple accounts at once on different tabs.

The MultiLogin extension adds a random number in the title of the tab, as well as renames the cookies in the tab. It adds the number and @@@ in it. So a cookie originally named "c_user" turns to "[email protected]@@_c_user".

In my second extension, I am running a content script that does AJAX calls on the website which work only when you're authenticated. However, in the network log, I can see in responses error messages saying I am not authenticated.

In my Chrome extension, I tried to get the value of "c_user" and it was indeed empty. When I tried to get the value of [email protected]@@_c_user, it showed me the needed value.

What I tried: Reading the number from the Tab Title, getting all cookies "@@@" and setting "normal" cookies - . But that breaks the multilogin functionality. Any idea if I can grab the cookies and apply them to the content script somehow? Can I set cookies in xmlhttprequest?

MultiLogin Extension: https://www.crx4chrome.com/crx/105428/

Unfortunately I cannot provide any code since I do not know how to approach this at all.

0 Answers