mirror of
https://github.com/bitwarden/browser
synced 2025-12-17 00:33:44 +00:00
[PM-6302, PM-6303] Add duo state and connector message on browser/desktop (#7957)
* pass state for clients * use redirect connector to set cookie with translations * simplify duo redirect url validation
This commit is contained in:
@@ -117,11 +117,22 @@ export class TwoFactorComponent extends BaseTwoFactorComponent implements OnDest
|
||||
}
|
||||
}
|
||||
|
||||
private handleDuoResultMessage = async (msg: { data: { code: string } }) => {
|
||||
this.token = msg.data.code;
|
||||
private handleDuoResultMessage = async (msg: { data: { code: string; state: string } }) => {
|
||||
this.token = msg.data.code + "|" + msg.data.state;
|
||||
await this.submit();
|
||||
};
|
||||
|
||||
override launchDuoFrameless() {
|
||||
const duoHandOffMessage = {
|
||||
title: this.i18nService.t("youSuccessfullyLoggedIn"),
|
||||
message: this.i18nService.t("thisWindowWillCloseIn5Seconds"),
|
||||
buttonText: this.i18nService.t("close"),
|
||||
isCountdown: true,
|
||||
};
|
||||
document.cookie = `duoHandOffMessage=${JSON.stringify(duoHandOffMessage)}; SameSite=strict;`;
|
||||
this.platformUtilsService.launchUri(this.duoFramelessUrl);
|
||||
}
|
||||
|
||||
async ngOnDestroy() {
|
||||
super.ngOnDestroy();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user