Skip to content

Commit 755e33c

Browse files
committed
using only verification code for sign-in
1 parent 3caea4a commit 755e33c

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

packages/auth/src/api/authentication/mfa.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export interface FinalizePhoneMfaSignInRequest {
8181

8282
export interface FinalizeTotpMfaSignInRequest {
8383
mfaPendingCredential: string;
84-
totpVerificationInfo: TotpVerificationInfo;
84+
verificationCode: string
8585
tenantId?: string;
8686
}
8787

packages/auth/src/mfa/assertions/totp.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,13 +159,15 @@ export class TotpMultiFactorAssertionImpl
159159
mfaPendingCredential: string
160160
): Promise<FinalizeMfaResponse> {
161161
_assert(
162-
typeof this.secret !== 'undefined',
162+
typeof this.enrollmentId !== 'undefined'
163+
&& typeof this.otp !== 'undefined'
164+
&& typeof this.secret !== 'undefined',
163165
auth,
164166
AuthErrorCode.ARGUMENT_ERROR
165167
);
166168
return finalizeSignInTotpMfa(auth, {
167169
mfaPendingCredential,
168-
totpVerificationInfo: this.secret._makeTotpVerificationInfo(this.otp)
170+
verificationCode: this.secret._makeTotpVerificationInfo(this.otp).verificationCode,
169171
});
170172
}
171173
}

0 commit comments

Comments
 (0)