mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-25 16:56:22 +02:00
feat(desktop): intercept OAuth redirects to hosted frontend via webRequest
This commit is contained in:
parent
a866e6caa1
commit
d4ad5c7fe4
3 changed files with 15 additions and 19 deletions
|
|
@ -60,15 +60,6 @@ const TokenHandler = ({
|
|||
setRefreshToken(refreshToken);
|
||||
}
|
||||
|
||||
// Desktop app: redirect tokens to the Electron deep link handler
|
||||
const loginSource = sessionStorage.getItem("surfsense_login_source");
|
||||
if (loginSource === "desktop") {
|
||||
sessionStorage.removeItem("surfsense_login_source");
|
||||
const deepLink = `surfsense://auth/callback?token=${token}${refreshToken ? `&refresh_token=${refreshToken}` : ""}`;
|
||||
window.location.href = deepLink;
|
||||
return;
|
||||
}
|
||||
|
||||
// Check if there's a saved redirect path from before the auth flow
|
||||
const savedRedirectPath = getAndClearRedirectPath();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue