Skip to content

Commit

Permalink
Merge branch 'feat/mfa/otp' into feat/mfa/totp
Browse files Browse the repository at this point in the history
  • Loading branch information
porcellus committed Nov 9, 2023
2 parents 1da8517 + fb89c18 commit 23e6a46
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions lib/build/passwordless-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/recipe/passwordless/recipe.d.ts

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/thirdpartypasswordlessprebuiltui.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/ts/recipe/passwordless/recipe.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export const otpEmailFactor = {
logo: OTPIcon,
};

export const passwordlessFirstFactors = ["otp-phone", "otp-email", "link-phone", "link-email"] as const;
export const passwordlessFactors = ["otp-phone", "otp-email", "link-phone", "link-email"] as const;

export default class Passwordless extends AuthRecipe<
GetRedirectionURLContext,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import { LinkSent } from "../../../../passwordless/components/themes/signInUp/li
import { PhoneForm } from "../../../../passwordless/components/themes/signInUp/phoneForm";
import { UserInputCodeForm } from "../../../../passwordless/components/themes/signInUp/userInputCodeForm";
import { UserInputCodeFormHeader } from "../../../../passwordless/components/themes/signInUp/userInputCodeFormHeader";
import { passwordlessFirstFactors } from "../../../../passwordless/recipe";
import { passwordlessFactors } from "../../../../passwordless/recipe";
import { ProvidersForm } from "../../../../thirdparty/components/themes/signInAndUp/providersForm";
import { ThemeBase } from "../themeBase";

Expand Down Expand Up @@ -67,11 +67,11 @@ const SignInUpTheme: React.FC<ThirdPartyPasswordlessSignInAndUpThemePropsWithAct
if (usesDynamicLoginMethods) {
thirdPartyEnabled = thirdPartyEnabled && loginMethods!.firstFactors.includes("thirdparty") && hasProviders;
passwordlessEnabled =
passwordlessEnabled && passwordlessFirstFactors.some((id) => loginMethods!.firstFactors.includes(id));
passwordlessEnabled && passwordlessFactors.some((id) => loginMethods!.firstFactors.includes(id));
} else if (mfa !== undefined) {
thirdPartyEnabled = thirdPartyEnabled && mfa.isFirstFactorEnabledOnClient("thirdparty");
passwordlessEnabled =
passwordlessEnabled && passwordlessFirstFactors.some((id) => mfa.isFirstFactorEnabledOnClient(id));
passwordlessEnabled && passwordlessFactors.some((id) => mfa.isFirstFactorEnabledOnClient(id));
}

if (thirdPartyEnabled === false && passwordlessEnabled === false) {
Expand Down

0 comments on commit 23e6a46

Please sign in to comment.