1
0
mirror of https://github.com/bitwarden/browser.git synced 2025-02-11 00:31:45 +01:00

PM-8113 - TwoFactorAuthComp - Add loginSuccessHandlerService

This commit is contained in:
Jared Snider 2025-02-03 17:43:47 -05:00
parent a5ca2f956e
commit 7ab9225af1
No known key found for this signature in database
GPG Key ID: A149DDD612516286

View File

@ -13,6 +13,7 @@ import {
UserDecryptionOptionsServiceAbstraction,
TrustedDeviceUserDecryptionOption,
UserDecryptionOptions,
LoginSuccessHandlerService,
} from "@bitwarden/auth/common";
import { AccountService } from "@bitwarden/common/auth/abstractions/account.service";
import { InternalMasterPasswordServiceAbstraction } from "@bitwarden/common/auth/abstractions/master-password.service.abstraction";
@ -143,6 +144,7 @@ export class TwoFactorAuthComponent implements OnInit, OnDestroy {
private destroyRef: DestroyRef,
private anonLayoutWrapperDataService: AnonLayoutWrapperDataService,
private environmentService: EnvironmentService,
private loginSuccessHandlerService: LoginSuccessHandlerService,
) {}
async ngOnInit() {
@ -364,7 +366,7 @@ export class TwoFactorAuthComponent implements OnInit, OnDestroy {
}
// User is fully logged in so handle any post login logic before executing navigation
await this.syncService.fullSync(true);
await this.loginSuccessHandlerService.run(authResult.userId);
this.loginEmailService.clearValues();
// Save off the OrgSsoIdentifier for use in the TDE flows