Google Error After Federated Logout from Electron App: "The browser you're using doesn't support JavaScript..."

Problem statement

Google displays the following error after a federated logout from an Electron App

Couldn’t sign you in: The browser you’re using doesn’t support JavaScript, or has JavaScript turned off" on the next login after a federated logout

Cause

The Electron app has initialized the browser with webPreferences.contextIsolation: false:

  let win = new BrowserWindow({
...
    webPreferences: {
...
        contextIsolation: false,
...
    }
  });

Solution

To resolve the error, remove this line that initializes the browser with webPreferences.contextIsolation: false:

  let win = new BrowserWindow({
...
    webPreferences: {
...
        // contextIsolation: false, <-- remove this
...
    }
  });