bbatliner / electron-wrapper

MIT License
23 stars 1 forks source link

Can't use multiple accounts in services like Google's suite which share logins across apps #7

Open jc-wood opened 7 years ago

jc-wood commented 7 years ago

If I create app1 and log into a google site with account1, and create app2 to use with account2, when opening app2 I am automatically logged in with account1.

It would seem as though each app is using the same data instead of having a data cache of its own.

bbatliner commented 7 years ago

I think this is an Electron thing. It uses its own version of Chromium, which internally caches and stores cookies for the whole installation, which any Electron app will use. So if you run multiple electron apps (including those not created with electron-wrapper), they will all use the same cache, cookies, saved logins, etc.

I haven't worked on Electron in a while. Do you know if there's a way to force electron to separate an app's local storage from other apps?

markstos commented 4 years ago

It seems like the answer is "no". There is has been open issue for this in Electron since 2014, which still does not appear close to a resolution.

There are some options for single-site-browsers, though.

In Google Chrome or Chromium, you can "Create Shortcut... Open As New Window". You can start with different Chrome use profiles to have different cookies.

Or you can use https://getwebcatalog.com/

On Linux the Gnome Web / Epiphany browser also allows creating single-site-browsers much like Chrome does.

sapioit commented 3 years ago

I wonder if we can make custom profiles for electron, like we can for chrome, or if we can choose a different path for where the electron's chrome data is saved, like we can for chrome browser and other chromium-based browsers.

In Chrome for Windows, we can use the following parameter, to modify where the profile is saved: --user-data-dir=%cd%\Profile" . Maybe try to see how that command like could be used, with electron.