Skip to content

Commit 979a244

Browse files
authored
Merge pull request #1241 from firebase/@invertase/bb-23
2 parents e42e891 + 2df2f96 commit 979a244

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

packages/react/src/auth/forms/mfa/totp-multi-factor-enrollment-form.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ describe("useMultiFactorEnrollmentVerifyTotpFormAction", () => {
123123
});
124124

125125
expect(TotpMultiFactorGeneratorAssertionMock).toHaveBeenCalledWith(mockSecret, "123456");
126-
expect(enrollWithMultiFactorAssertionMock).toHaveBeenCalledWith(expect.any(Object), mockAssertion, "123456");
126+
expect(enrollWithMultiFactorAssertionMock).toHaveBeenCalledWith(expect.any(Object), mockAssertion, "Test User");
127127
});
128128

129129
it("should throw an unknown error when its not a FirebaseUIError", async () => {

packages/react/src/auth/forms/mfa/totp-multi-factor-enrollment-form.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,17 @@ function TotpMultiFactorSecretGenerationForm(props: TotpMultiFactorSecretGenerat
8282
export function useMultiFactorEnrollmentVerifyTotpFormAction() {
8383
const ui = useUI();
8484
return useCallback(
85-
async ({ secret, verificationCode }: { secret: TotpSecret; verificationCode: string; displayName: string }) => {
85+
async ({
86+
secret,
87+
verificationCode,
88+
displayName,
89+
}: {
90+
secret: TotpSecret;
91+
verificationCode: string;
92+
displayName: string;
93+
}) => {
8694
const assertion = TotpMultiFactorGenerator.assertionForEnrollment(secret, verificationCode);
87-
return await enrollWithMultiFactorAssertion(ui, assertion, verificationCode);
95+
return await enrollWithMultiFactorAssertion(ui, assertion, displayName);
8896
},
8997
[ui]
9098
);

0 commit comments

Comments
 (0)