Skip to content

Commit

Permalink
Merge branch 'feat/mfa/recipe-setup' into feat/mfa/otp
Browse files Browse the repository at this point in the history
  • Loading branch information
porcellus committed Nov 9, 2023
2 parents 666d3fb + 150c9ad commit b1203cf
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 10 deletions.
10 changes: 10 additions & 0 deletions lib/build/multifactorauth-shared.js

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

1 change: 1 addition & 0 deletions lib/build/recipe/multifactorauth/recipe.d.ts

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

14 changes: 13 additions & 1 deletion lib/ts/recipe/multifactorauth/recipe.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { SessionClaimValidatorStore } from "supertokens-web-js/utils/sessionClai

import { SSR_ERROR } from "../../constants";
import SuperTokens from "../../superTokens";
import { getCurrentNormalisedUrlPath, getRedirectToPathFromURL } from "../../utils";
import { getCurrentNormalisedUrlPath, getRedirectToPathFromURL, isTest } from "../../utils";
import RecipeModule from "../recipeModule";

import { DEFAULT_FACTOR_CHOOSER_PATH } from "./constants";
Expand Down Expand Up @@ -193,4 +193,16 @@ export default class MultiFactorAuth extends RecipeModule<

return SuperTokens.getInstanceOrThrow().redirectToUrl(url, history);
}

/*
* Tests methods.
*/
static reset(): void {
if (!isTest()) {
return;
}

MultiFactorAuth.instance = undefined;
return;
}
}
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,15 +119,15 @@
"size-limit": [
{
"path": "lib/build/index.js",
"limit": "15kb"
"limit": "17kb"
},
{
"path": "recipe/session/index.js",
"limit": "16kb"
"limit": "18kb"
},
{
"path": "recipe/session/prebuiltui.js",
"limit": "20kb"
"limit": "21kb"
},
{
"path": "recipe/thirdpartyemailpassword/index.js",
Expand Down Expand Up @@ -155,27 +155,27 @@
},
{
"path": "recipe/emailverification/prebuiltui.js",
"limit": "25kb"
"limit": "27kb"
},
{
"path": "recipe/thirdpartyemailpassword/prebuiltui.js",
"limit": "56kb"
"limit": "58kb"
},
{
"path": "recipe/thirdparty/prebuiltui.js",
"limit": "40kb"
"limit": "42kb"
},
{
"path": "recipe/emailpassword/prebuiltui.js",
"limit": "30kb"
"limit": "32kb"
},
{
"path": "recipe/passwordless/prebuiltui.js",
"limit": "107kb"
"limit": "110kb"
},
{
"path": "recipe/thirdpartypasswordless/prebuiltui.js",
"limit": "135kb"
"limit": "140kb"
},
{
"path": "recipe/multitenancy/index.js",
Expand Down

0 comments on commit b1203cf

Please sign in to comment.