Skip to content

Commit

Permalink
fix: properly apply getSecondaryFactorInfo from user config
Browse files Browse the repository at this point in the history
  • Loading branch information
porcellus committed Nov 7, 2024
1 parent bfe9f61 commit 34647fb
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 12 deletions.
14 changes: 9 additions & 5 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: 1 addition & 1 deletion lib/build/multifactorauthprebuiltui.js

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

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/types.d.ts

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

Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ export const FactorOption = withOverride(
id: string;
name: string;
description: string;
logo: FC;
logo: FC | undefined;
}): JSX.Element {
const t = useTranslation();
return (
<a data-supertokens={`factorChooserOption ${id}`} onClick={onClick}>
<div data-supertokens="factorLogo"> {logo({})}</div>
<div data-supertokens="factorLogo"> {logo ? logo({}) : null}</div>
<div data-supertokens="factorOptionText">
<h6 data-supertokens="factorName">{t(name)}</h6>
<p data-supertokens="factorDescription">{t(description)}</p>
Expand Down
2 changes: 1 addition & 1 deletion lib/ts/recipe/multifactorauth/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export type SecondaryFactorRedirectionInfo = {
id: string;
name: string;
description: string;
logo: FC;
logo: FC | undefined;
path: string;
};

Expand Down
2 changes: 1 addition & 1 deletion lib/ts/recipe/multifactorauth/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export function normaliseMultiFactorAuthFeature(config?: Config): NormalisedConf
...normaliseRecipeModuleConfig(config),
disableDefaultUI,
firstFactors: config?.firstFactors,
getSecondaryFactorInfo: (orig) => orig,
getSecondaryFactorInfo: config?.getSecondaryFactorInfo ?? ((orig) => orig),
factorChooserScreen: config.factorChooserScreen ?? {},
override,
};
Expand Down

0 comments on commit 34647fb

Please sign in to comment.