1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-28 18:43:26 +00:00

feat(redirect): [PM-26578] Https Redirection for Cloud Users - Rolled back webpack changes

This commit is contained in:
Patrick Pimentel
2026-01-08 13:30:21 -05:00
parent ee06ddc1a2
commit 79e1b13ae4
2 changed files with 0 additions and 31 deletions

View File

@@ -1,21 +0,0 @@
declare const __PM_6962_NATIVE_MOBILE_APPS_CLIENT_UPDATES__: boolean;
const SELF_HOSTED = (process.env.SELF_HOSTED || "false").toLowerCase() === "true";
function appLinkHost(): string {
const h = window.location.hostname || "";
if (h.endsWith("bitwarden.eu")) {
return "bitwarden.eu";
}
if (h.endsWith("bitwarden.pw")) {
return "bitwarden.pw";
}
return "bitwarden.com";
}
export function buildMobileCallbackUri(kind: "sso" | "duo" | "webauthn"): string {
const path = `${kind}-callback`;
if (!SELF_HOSTED && __PM_6962_NATIVE_MOBILE_APPS_CLIENT_UPDATES__) {
return `https://${appLinkHost()}/${path}`;
}
return `bitwarden://${path}`;
}