diff --git a/src/backend/utils/user-agent-parser.ts b/src/backend/utils/user-agent-parser.ts
index 7a56eb30..fb1a3563 100644
--- a/src/backend/utils/user-agent-parser.ts
+++ b/src/backend/utils/user-agent-parser.ts
@@ -22,6 +22,10 @@ export function detectPlatform(req: Request): DeviceType {
return "mobile";
}
+ if (userAgent.includes("Android")) {
+ return "mobile";
+ }
+
return "web";
}
diff --git a/src/ui/desktop/authentication/Auth.tsx b/src/ui/desktop/authentication/Auth.tsx
index 9dd827a9..0de49c8d 100644
--- a/src/ui/desktop/authentication/Auth.tsx
+++ b/src/ui/desktop/authentication/Auth.tsx
@@ -103,6 +103,7 @@ export function Auth({
const [totpCode, setTotpCode] = useState("");
const [totpTempToken, setTotpTempToken] = useState("");
const [totpLoading, setTotpLoading] = useState(false);
+ const [webviewAuthSuccess, setWebviewAuthSuccess] = useState(false);
useEffect(() => {
setInternalLoggedIn(loggedIn);
@@ -241,6 +242,9 @@ export function Auth({
},
"*",
);
+ setWebviewAuthSuccess(true);
+ setLoading(false);
+ return;
} catch (e) {}
}
@@ -414,6 +418,9 @@ export function Auth({
},
"*",
);
+ setWebviewAuthSuccess(true);
+ setTotpLoading(false);
+ return;
} catch (e) {}
}
@@ -518,6 +525,9 @@ export function Auth({
},
"*",
);
+ setWebviewAuthSuccess(true);
+ setOidcLoading(false);
+ return;
} catch (e) {}
}
}
@@ -791,14 +801,41 @@ export function Auth({
style={{ maxHeight: "calc(100vh - 1rem)" }}
{...props}
>
- {isInElectronWebView() && (
+ {isInElectronWebView() && !webviewAuthSuccess && (
+ {t("auth.redirectingToApp")} +
+