Two tabs in the same window with different logins

2,167 views
Skip to first unread message

Thing

unread,
Feb 6, 2020, 11:28:22 AM2/6/20
to Chromium Extensions
Hello,
Do we have access, from the Chromium Extensions, to website logins/cookies?
Or is it oustide of the scope of Extensions?
Btw, is there an official doc showing the global scope of what is feasible inside an extension?

Example:
Is it possible to make that if Tab #1 is logged on Gmail, then, when browsing on Tab #2 on www.gmail.com, it does't see it as logged in and offers to re-log in, without changing anything for Tab #1?

See you

wOxxOm

unread,
Feb 7, 2020, 10:59:21 AM2/7/20
to Chromium Extensions

Neta

unread,
Feb 10, 2020, 10:07:59 AM2/10/20
to Chromium Extensions
The best way to know what is possible. Is to search the Web Store. Every idea you have someone already thought about it :)
And if no, you can merge two ideas into your own creative idea.
Search Google for "Multi-Session chrome web store". You will see what is possible.

According to your questions. Cookies saved per browser instance, no per tab. So you can't log in at the same time in the browser using two accounts.
BUT - Google support native multi-login, so you can do it for Google websites only because they support it.

Alternatively, you can ask the user to enable the extension in icognito window, and choose another account there, or run Gmail in the remote browser and open remote desktop, or create new user data dir, or new Chrome profile.

Thing

unread,
Feb 10, 2020, 10:44:51 AM2/10/20
to Chromium Extensions
Thanks @wOxxOm for the links.

@Neta :
> According to your questions. Cookies saved per browser instance, no per tab. So you can't log in at the same time in the browser using two accounts.

Are you sure there's no workaround?

Couldn't we use the tabs API + cookies API to:
* backup the current tab's cookies each time we click to another tab, let's say Tab #7
* restore the backuped cookies for Tab #7 just before tab 7 is restored / displayed

Thus could we have:
* Tab #1: Twitter logged in with account 1
* Tab #2: Twitter logged in with account 2
?

PhistucK

unread,
Feb 10, 2020, 12:37:57 PM2/10/20
to Thing, Chromium Extensions
This solution will fail if there are background requests (unless maybe if you use the blocking web request API, but that is deprecated and discouraged, so it is not a viable long term solution).

PhistucK


--
You received this message because you are subscribed to the Google Groups "Chromium Extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/95b16eb8-5320-4d68-a941-5d8869d20ab0%40chromium.org.

Thing

unread,
Feb 10, 2020, 2:09:32 PM2/10/20
to Chromium Extensions, thingc...@gmail.com
Thanks for your answer.

On Monday, February 10, 2020 at 6:37:57 PM UTC+1, PhistucK wrote:
This solution will fail if there are background requests (unless maybe if you use the blocking web request API, but that is deprecated and discouraged, so it is not a viable long term solution).

So do you think there is really no workaround?

How does Cent Browser (Chromium-based browser) do? They have a multilogin feature, with multiple tabs in the same window having different logins for the same website.

If anyone knows how Firefox multi-account containers extension solves this problem, maybe we can see if it's possible to transpose it to Chrome?

PhistucK

unread,
Feb 10, 2020, 4:58:44 PM2/10/20
to Thing, Chromium Extensions
Chrome applications ("Chrome Apps") might have been able to do that, but they are also deprecated.

When you fork Chromium, you can do whatever you want, but the extension system is not powerful enough to meet this use case properly at the moment, I believe.

Firefox probably provides an isolation API or something like that.

PhistucK


--
You received this message because you are subscribed to the Google Groups "Chromium Extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.

Simeon Vincent

unread,
Feb 10, 2020, 9:24:13 PM2/10/20
to PhistucK, Thing, Chromium Extensions
If I may, why not use two different profiles to maintain a separate set of cookies?

Simeon - @dotproto
Extensions Developer Advocate


Thing

unread,
Feb 11, 2020, 2:37:28 AM2/11/20
to Chromium Extensions, phis...@gmail.com, thingc...@gmail.com
@dotproto

If I may, why not use two different profiles to maintain a separate set of cookies?

For this use case, I'd like to have tabs in the same window with different set of cookies, and not in different windows.

As far as I know, using 2 different profiles in 2 tabs of the same Chrome window is not possible, is it right?
Reply all
Reply to author
Forward
0 new messages