Skip to content

Commit

Permalink
PM-8113 - Revert changes to login strategies to avoid scope creep for…
Browse files Browse the repository at this point in the history
… the sake of typescript strictness.
  • Loading branch information
JaredSnider-Bitwarden committed Jan 25, 2025
1 parent 7b5a751 commit 08a13c0
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ describe("TwoFactorComponent", () => {
// Assert
expect(mockLoginStrategyService.logInTwoFactor).toHaveBeenCalledWith(
new TokenTwoFactorRequest(component.selectedProviderType, token, remember),
"",
);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ export class TwoFactorAuthComponent implements OnInit, OnDestroy {
try {
this.formPromise = this.loginStrategyService.logInTwoFactor(
new TokenTwoFactorRequest(this.selectedProviderType, this.token, this.remember),
"", // TODO: PM-15162 - deprecate captchaResponse
);
const authResult: AuthResult = await this.formPromise;
this.logService.info("Successfully submitted two factor token");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export abstract class LoginStrategyServiceAbstraction {
logInTwoFactor: (
twoFactor: TokenTwoFactorRequest,
// TODO: PM-15162 - deprecate captchaResponse
captchaResponse?: string,
captchaResponse: string,
) => Promise<AuthResult>;
/**
* Creates a master key from the provided master password and email.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ export class LoginStrategyService implements LoginStrategyServiceAbstraction {

async logInTwoFactor(
twoFactor: TokenTwoFactorRequest,
captchaResponse?: string,
captchaResponse: string,
): Promise<AuthResult> {
if (!(await this.isSessionValid())) {
throw new Error(this.i18nService.t("sessionTimeout"));
Expand Down

0 comments on commit 08a13c0

Please sign in to comment.