Skip to content

Commit

Permalink
Merge branch 'feat/mfa/tests' into feat/mfa/storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
porcellus committed Oct 31, 2023
2 parents 5132f13 + c11f185 commit 7c7bde4
Show file tree
Hide file tree
Showing 65 changed files with 1,339 additions and 769 deletions.
6 changes: 5 additions & 1 deletion examples/for-tests/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ let recipeList = [
},
}),
MultiFactorAuth.init({
firstFactors: ["otp-phone", "otp-email", "thirdparty"],
firstFactors: testContext.firstFactors,
}),
Multitenancy.init({
override: {
Expand Down Expand Up @@ -557,6 +557,10 @@ export function DashboardHelper({ redirectOnLogout, ...props } = {}) {
</div>
<div className="session-context-userId">session context userID: {sessionContext.userId}</div>
<pre className="invalidClaims">{JSON.stringify(sessionContext.invalidClaims, undefined, 2)}</pre>
<a onClick={() => MultiFactorAuth.redirectToFactorChooser(true, props.history)}>MFA chooser</a>
<a onClick={() => MultiFactorAuth.redirectToFactor("totp", true, props.history)}>TOTP</a>
<a onClick={() => MultiFactorAuth.redirectToFactor("otp-email", true, props.history)}>OTP-Email</a>
<a onClick={() => MultiFactorAuth.redirectToFactor("otp-phone", true, props.history)}>OTP-Phone</a>
</div>
);
}
Expand Down
1 change: 1 addition & 0 deletions examples/for-tests/src/testContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export function getTestContext() {
staticProviderList: localStorage.getItem("staticProviderList"),
mockTenantId: localStorage.getItem("mockTenantId"),
clientType: localStorage.getItem("clientType") || undefined,
firstFactors: localStorage.getItem("firstFactors")?.split(", "),
};
return ret;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/build/authRecipe-shared2.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/build/emailpasswordprebuiltui.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions lib/build/emailverificationprebuiltui.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 13 additions & 9 deletions lib/build/index2.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

41 changes: 27 additions & 14 deletions lib/build/multifactorauth-shared.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions lib/build/multifactorauth-shared2.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions lib/build/multifactorauth.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 23 additions & 7 deletions lib/build/multifactorauthprebuiltui.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 7c7bde4

Please sign in to comment.