Skip to content

Commit

Permalink
refactor: remove updates that will be added in other PRs + simplifica…
Browse files Browse the repository at this point in the history
…tions
  • Loading branch information
porcellus committed Nov 9, 2023
1 parent f45271c commit 1990358
Show file tree
Hide file tree
Showing 15 changed files with 23 additions and 593 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

#### Introducing MFA

With this release, we are introducing MultiFactorAuthentication and TOTP, this will let you:
With this release, we are introducing MultiFactorAuth and TOTP, this will let you:

- require (2FA or MFA) during sign in
- make use of our TOTP
Expand Down
2 changes: 0 additions & 2 deletions lib/build/components/assets/otpIcon.d.ts

This file was deleted.

2 changes: 1 addition & 1 deletion lib/build/multifactorauth-shared.js

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

76 changes: 0 additions & 76 deletions lib/build/passwordless-shared2.js

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

3 changes: 0 additions & 3 deletions lib/build/passwordless.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/recipe/multifactorauth/index.d.ts

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

8 changes: 2 additions & 6 deletions lib/build/recipe/multifactorauth/types.d.ts

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

38 changes: 0 additions & 38 deletions lib/build/recipe/passwordless/components/features/mfa/index.d.ts

This file was deleted.

3 changes: 0 additions & 3 deletions lib/build/thirdpartypasswordless.js

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

32 changes: 0 additions & 32 deletions lib/ts/components/assets/otpIcon.tsx

This file was deleted.

4 changes: 3 additions & 1 deletion lib/ts/recipe/multifactorauth/recipe.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,9 @@ export default class MultiFactorAuth extends RecipeModule<
} else if (context.action === "GO_TO_FACTOR") {
const redirectInfo = this.getSecondaryFactors().find((f) => f.id === context.factorId);
if (redirectInfo !== undefined) {
return this.config.appInfo.websiteBasePath.appendPath(redirectInfo.path).getAsStringDangerous();
return this.config.appInfo.websiteBasePath
.appendPath(new NormalisedURLPath(redirectInfo.path))
.getAsStringDangerous();
}
throw new Error("Requested redirect to unknown factor id");
} else {
Expand Down
8 changes: 2 additions & 6 deletions lib/ts/recipe/multifactorauth/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import type {
} from "../recipeModule/types";
import type { FC } from "react";
import type { OverrideableBuilder } from "supertokens-js-override";
import type NormalisedURLPath from "supertokens-web-js/lib/build/normalisedURLPath";
import type { RecipeInterface } from "supertokens-web-js/recipe/multifactorauth";
import type { MFAFactorInfo } from "supertokens-web-js/recipe/multifactorauth/types";

Expand Down Expand Up @@ -81,10 +80,7 @@ export type PreAPIHookContext = {
userContext: any;
};

export type OnHandleEventContext = {
action: "FACTOR_CHOSEN";
userContext: any;
};
export type OnHandleEventContext = never;

export type FactorChooserThemeProps = {
mfaInfo: MFAFactorInfo;
Expand All @@ -102,5 +98,5 @@ export type SecondaryFactorRedirectionInfo = {
name: string;
description: string;
logo: FC;
path: NormalisedURLPath;
path: string;
};
Loading

0 comments on commit 1990358

Please sign in to comment.