Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/auth/test/helpers/integration/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,6 @@ export function getTotpCode(
return token;
}
export const email = '[email protected]';
export const fakePassword = 'password';
export const password = 'password';
//1000000 is always incorrect since it has 7 digits and we expect 6.
export const incorrectTotpCode = '1000000';
14 changes: 7 additions & 7 deletions packages/auth/test/integration/flows/totp.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import {
getTestInstance,
getTotpCode,
email,
fakePassword,
password,
incorrectTotpCode
} from '../../helpers/integration/helpers';

Expand Down Expand Up @@ -77,7 +77,7 @@ describe(' Integration tests: Mfa enrollement using totp', () => {
this.skip();
}

const cr = await signInWithEmailAndPassword(auth, email, fakePassword);
const cr = await signInWithEmailAndPassword(auth, email, password);
mfaUser = multiFactor(cr.user);
const session = await mfaUser.getSession();
totpSecret = await TotpMultiFactorGenerator.generateSecret(session);
Expand All @@ -98,7 +98,7 @@ describe(' Integration tests: Mfa enrollement using totp', () => {
this.skip();
}

const cr = await signInWithEmailAndPassword(auth, email, fakePassword);
const cr = await signInWithEmailAndPassword(auth, email, password);
mfaUser = multiFactor(cr.user);
const session = await mfaUser.getSession();
totpSecret = await TotpMultiFactorGenerator.generateSecret(session);
Expand Down Expand Up @@ -130,7 +130,7 @@ describe('Integration tests: sign-in for mfa-enrolled users', () => {
auth = getTestInstance();
displayName = 'totp-integration-test';

const cr = await signInWithEmailAndPassword(auth, email, fakePassword);
const cr = await signInWithEmailAndPassword(auth, email, password);
mfaUser = multiFactor(cr.user);
const session = await mfaUser.getSession();
totpSecret = await TotpMultiFactorGenerator.generateSecret(session);
Expand Down Expand Up @@ -169,7 +169,7 @@ describe('Integration tests: sign-in for mfa-enrolled users', () => {
this.skip();
}
try {
await signInWithEmailAndPassword(auth, email, fakePassword);
await signInWithEmailAndPassword(auth, email, password);

throw new Error('Signin should not have been successful');
} catch (error) {
Expand All @@ -196,7 +196,7 @@ describe('Integration tests: sign-in for mfa-enrolled users', () => {
this.skip();
}
try {
await signInWithEmailAndPassword(auth, email, fakePassword);
await signInWithEmailAndPassword(auth, email, password);

throw new Error('Signin should not have been successful');
} catch (error) {
Expand All @@ -223,7 +223,7 @@ describe('Integration tests: sign-in for mfa-enrolled users', () => {
mfaUser = multiFactor(userCredential.user);

await expect(mfaUser.unenroll(resolver.hints[0].uid)).to.be.fulfilled;
await expect(signInWithEmailAndPassword(auth, email, fakePassword)).to.be
await expect(signInWithEmailAndPassword(auth, email, password)).to.be
.fulfilled;
}
});
Expand Down