mirror of
https://github.com/zulip/zulip-desktop.git
synced 2025-10-23 03:31:56 +00:00
google-oauth: Fix Google sign-in issue.
This commit is contained in:
@@ -142,6 +142,16 @@ class WebView extends BaseComponent {
|
|||||||
userAgent = SystemUtil.getUserAgent();
|
userAgent = SystemUtil.getUserAgent();
|
||||||
}
|
}
|
||||||
this.$el.setUserAgent(userAgent);
|
this.$el.setUserAgent(userAgent);
|
||||||
|
|
||||||
|
this.$el.getWebContents().session.webRequest.onBeforeSendHeaders((details, callback) => {
|
||||||
|
let googleLoginURLs = ['accounts.google.com/signin/oauth', 'accounts.google.com/ServiceLogin']
|
||||||
|
googleLoginURLs.forEach((loginURL) => {
|
||||||
|
if (details.url.indexOf(loginURL) > -1) {
|
||||||
|
this.$el.setUserAgent('Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0')
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
this.$el.addEventListener('did-stop-loading', () => {
|
this.$el.addEventListener('did-stop-loading', () => {
|
||||||
|
Reference in New Issue
Block a user