1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 00:03:56 +00:00

[PM-4612] [PM-6218] [PM-6219] Enable Duo redirect on Desktop Client (#7798)

* enable duo for desktop

* added missing return path in main.ts

* updated logic in component

* removed switch added await; updated logic in main.

* addressed subscription concerns in main; updated formatting in 2fa component

* Update Duo case in locales
This commit is contained in:
Ike
2024-02-14 09:06:04 -08:00
committed by GitHub
parent 1ff7bdd014
commit e5d4d4ad00
8 changed files with 234 additions and 160 deletions

View File

@@ -277,15 +277,24 @@ export class Main {
const url = new URL(s);
const code = url.searchParams.get("code");
const receivedState = url.searchParams.get("state");
let message = "";
if (code == null || receivedState == null) {
if (code === null) {
return;
}
const message =
s.indexOf("bitwarden://import-callback-lp") === 0
? "importCallbackLastPass"
: "ssoCallback";
if (s.indexOf("bitwarden://duo-callback") === 0) {
message = "duoCallback";
} else if (receivedState === null) {
return;
}
if (s.indexOf("bitwarden://import-callback-lp") === 0) {
message = "importCallbackLastPass";
} else if (s.indexOf("bitwarden://sso-callback") === 0) {
message = "ssoCallback";
}
this.messagingService.send(message, { code: code, state: receivedState });
});
}