From 3ef18ab5b85f860135872e97a438247aa40b1913 Mon Sep 17 00:00:00 2001 From: Dmitry Bushev Date: Thu, 10 Mar 2022 10:44:19 +0300 Subject: [PATCH] Update Electron (#3316) PR fixes the issue when the user is unable to sign in with Google. In the end, my assumption about the `User-Agent` header was correct and Google sign-in works with the recent Electron out of the box. --- CHANGELOG.md | 1 + app/ide-desktop/lib/client/package.js | 6 +++--- app/ide-desktop/lib/client/src/index.js | 14 -------------- 3 files changed, 4 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 41db2cec1558..3cb8119fe28f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -96,6 +96,7 @@ [3305]: https://github.com/enso-org/enso/pull/3305 [3309]: https://github.com/enso-org/enso/pull/3309 [3310]: https://github.com/enso-org/enso/pull/3310 +[3316]: https://github.com/enso-org/enso/pull/3316 [3236]: https://github.com/enso-org/enso/pull/3236 [3311]: https://github.com/enso-org/enso/pull/3311 [3317]: https://github.com/enso-org/enso/pull/3317 diff --git a/app/ide-desktop/lib/client/package.js b/app/ide-desktop/lib/client/package.js index e213a51b7075..be623451fa6d 100644 --- a/app/ide-desktop/lib/client/package.js +++ b/app/ide-desktop/lib/client/package.js @@ -29,10 +29,10 @@ let config = { 'compression-webpack-plugin': '^3.1.0', 'copy-webpack-plugin': '^5.1.1', devtron: '^1.4.0', - electron: '12.2.3', - 'electron-builder': '^22.10.5', + electron: '17.1.0', + 'electron-builder': '^22.14.13', 'crypto-js': '4.0.0', - 'electron-notarize': '1.0.0', + 'electron-notarize': '1.1.1', }, scripts: { diff --git a/app/ide-desktop/lib/client/src/index.js b/app/ide-desktop/lib/client/src/index.js index 183dd64187dc..d866a76cc917 100644 --- a/app/ide-desktop/lib/client/src/index.js +++ b/app/ide-desktop/lib/client/src/index.js @@ -438,7 +438,6 @@ let mainWindow = null let origin = null async function main(args) { - setUserAgent() runBackend() console.log('Starting the IDE service.') if (args.server !== false) { @@ -460,19 +459,6 @@ async function main(args) { } } -/// Set custom user agent to fix the issue with Google authentication. -/// -/// Google authentication doesn't work with the default Electron user agent. And -/// Google is quite picky about the values you provide. For example, just -/// removing Electron occurrences from the default user agent doesn't work. This -/// user agent was chosen by trial and error as a stable one. -/// -/// https://github.com/firebase/firebase-js-sdk/issues/2478 -function setUserAgent() { - const agent = 'Mozilla/5.0 (Windows NT 10.0; WOW64; rv:70.0) Gecko/20100101 Firefox/70.0' - Electron.app.userAgentFallback = agent - Electron.session.defaultSession.setUserAgent(agent) -} function urlParamsFromObject(obj) { let params = [] for (let key in obj) {