mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-07-08 22:22:17 +02:00
fix(desktop):add oauth session handoff
This commit is contained in:
parent
f481d1360a
commit
fcf2485863
4 changed files with 191 additions and 6 deletions
|
|
@ -94,6 +94,10 @@ export function createMainWindow(initialPath = '/dashboard'): BrowserWindow {
|
|||
session.defaultSession.webRequest.onBeforeRequest(rewriteFilter, (details, callback) => {
|
||||
try {
|
||||
const u = new URL(details.url);
|
||||
if (!u.pathname.includes('/connectors/callback')) {
|
||||
callback({});
|
||||
return;
|
||||
}
|
||||
const originalHost = u.host;
|
||||
const local = new URL(getServerOrigin());
|
||||
u.protocol = local.protocol;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue