Skip to content

Commit 69f88ed

Browse files
committed
Force user agent for Google OAuth to work
1 parent eb10bf2 commit 69f88ed

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

index.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,12 @@ function createMainWindow() {
6060
win.maximize();
6161
}
6262

63-
win.webContents.loadURL(store.get("url"));
63+
// Force user-agent "Firefox Windows" for Google OAuth to work
64+
// From https://github.com/firebase/firebase-js-sdk/issues/2478#issuecomment-571356751
65+
const userAgent =
66+
"Mozilla/5.0 (Windows NT 10.0; WOW64; rv:70.0) Gecko/20100101 Firefox/70.0";
67+
68+
win.webContents.loadURL(store.get("url"), { userAgent });
6469
win.on("closed", onClosed);
6570

6671
injectCSS(win.webContents, path.join(__dirname, "youtube-music.css"));

0 commit comments

Comments
 (0)