Skip to content

Commit f712d49

Browse files
committed
fixing totp signin response
1 parent 64fb991 commit f712d49

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

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

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ describe('core/mfa/totp/assertions/TotpMultiFactorAssertionImpl', () => {
213213
});
214214
});
215215

216-
describe('Testing signIn Flow', () => {
216+
describe('Testing signin Flow', () => {
217217
let auth: TestAuth;
218218
let assertion: MultiFactorAssertionImpl;
219219
let totpSignInResponse: StartTotpMfaSignInResponse;
@@ -228,7 +228,12 @@ describe('Testing signIn Flow', () => {
228228
afterEach(mockFetch.tearDown);
229229

230230
it('should finalize mfa signin for totp', async () => {
231-
totpSignInResponse = { 'verificationCode': '123456' } as any;
231+
232+
totpSignInResponse = {
233+
verificationCode: '123456',
234+
idToken: 'final-id-token',
235+
refreshToken: 'refresh-token'
236+
} as any;
232237
assertion = TotpMultiFactorGenerator.assertionForSignIn(
233238
'enrollment-id',
234239
'123456'
@@ -254,7 +259,11 @@ describe('Testing signIn Flow', () => {
254259

255260
it('should throw Firebase Error if enrollment-id is undefined', async () => {
256261
let _response: FinalizeMfaResponse;
257-
totpSignInResponse = { 'verificationCode': '123456' } as any;
262+
totpSignInResponse = {
263+
verificationCode: '123456',
264+
idToken: 'final-id-token',
265+
refreshToken: 'refresh-token'
266+
} as any;
258267
assertion = TotpMultiFactorGenerator.assertionForSignIn(
259268
undefined as any,
260269
'123456'
@@ -270,7 +279,11 @@ describe('Testing signIn Flow', () => {
270279

271280
it('should throw Firebase Error if otp is undefined', async () => {
272281
let _response: FinalizeMfaResponse;
273-
totpSignInResponse = { 'verificationCode': '123456' } as any;
282+
totpSignInResponse = {
283+
verificationCode: '123456',
284+
idToken: 'final-id-token',
285+
refreshToken: 'refresh-token'
286+
} as any;
274287
assertion = TotpMultiFactorGenerator.assertionForSignIn(
275288
'enrollment-id',
276289
undefined as any

0 commit comments

Comments
 (0)