1
0
mirror of https://github.com/bitwarden/browser.git synced 2025-02-06 23:51:28 +01:00

PM-17466 - RegistrationFinishComp - Add call to loginSuccessHandlerService after successful login (#13059)

This commit is contained in:
Jared Snider 2025-01-24 13:25:51 -05:00 committed by GitHub
parent 6acaa6c711
commit 315e1338d5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -16,7 +16,11 @@ import { LogService } from "@bitwarden/common/platform/abstractions/log.service"
import { ValidationService } from "@bitwarden/common/platform/abstractions/validation.service"; import { ValidationService } from "@bitwarden/common/platform/abstractions/validation.service";
import { ToastService } from "@bitwarden/components"; import { ToastService } from "@bitwarden/components";
import { LoginStrategyServiceAbstraction, PasswordLoginCredentials } from "../../../common"; import {
LoginStrategyServiceAbstraction,
LoginSuccessHandlerService,
PasswordLoginCredentials,
} from "../../../common";
import { AnonLayoutWrapperDataService } from "../../anon-layout/anon-layout-wrapper-data.service"; import { AnonLayoutWrapperDataService } from "../../anon-layout/anon-layout-wrapper-data.service";
import { InputPasswordComponent } from "../../input-password/input-password.component"; import { InputPasswordComponent } from "../../input-password/input-password.component";
import { PasswordInputResult } from "../../input-password/password-input-result"; import { PasswordInputResult } from "../../input-password/password-input-result";
@ -68,6 +72,7 @@ export class RegistrationFinishComponent implements OnInit, OnDestroy {
private loginStrategyService: LoginStrategyServiceAbstraction, private loginStrategyService: LoginStrategyServiceAbstraction,
private logService: LogService, private logService: LogService,
private anonLayoutWrapperDataService: AnonLayoutWrapperDataService, private anonLayoutWrapperDataService: AnonLayoutWrapperDataService,
private loginSuccessHandlerService: LoginSuccessHandlerService,
) {} ) {}
async ngOnInit() { async ngOnInit() {
@ -189,6 +194,8 @@ export class RegistrationFinishComponent implements OnInit, OnDestroy {
message: this.i18nService.t("youHaveBeenLoggedIn"), message: this.i18nService.t("youHaveBeenLoggedIn"),
}); });
await this.loginSuccessHandlerService.run(authenticationResult.userId);
await this.router.navigate(["/vault"]); await this.router.navigate(["/vault"]);
} catch (e) { } catch (e) {
// If login errors, redirect to login page per product. Don't show error // If login errors, redirect to login page per product. Don't show error