+ {claim.loading === false && (claim.value?.n.length ?? 0) > 1 && (
+
+ {t("PWLESS_MFA_FOOTER_CHOOSER_ANOTHER")}
+
+ )}
+
+
+ {t("PWLESS_MFA_FOOTER_LOGOUT")}
+
+
+ );
+ }
+);
diff --git a/lib/ts/recipe/passwordless/components/themes/mfa/mfaHeader.tsx b/lib/ts/recipe/passwordless/components/themes/mfa/mfaHeader.tsx
new file mode 100644
index 000000000..c2ac7399b
--- /dev/null
+++ b/lib/ts/recipe/passwordless/components/themes/mfa/mfaHeader.tsx
@@ -0,0 +1,53 @@
+/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved.
+ *
+ * This software is licensed under the Apache License, Version 2.0 (the
+ * "License") as published by the Apache Software Foundation.
+ *
+ * You may not use this file except in compliance with the License. You may
+ * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+import { Fragment } from "react";
+
+import { withOverride } from "../../../../../components/componentOverride/withOverride";
+import { useTranslation } from "../../../../../translation/translationContext";
+import BackButton from "../../../../emailpassword/components/library/backButton";
+import { MultiFactorAuthClaim } from "../../../../multifactorauth";
+import { useClaimValue } from "../../../../session";
+
+export const MFAHeader = withOverride(
+ "PasswordlessMFAHeader",
+ function PasswordlessMFAHeader(props: {
+ contactMethod: "EMAIL" | "PHONE";
+ onBackButtonClicked: () => void;
+ }): JSX.Element {
+ const t = useTranslation();
+ const claim = useClaimValue(MultiFactorAuthClaim);
+
+ return (
+
+ {isSetupAllowed ? (
+
+ recipeImplementation.clearLoginAttemptInfo({
+ userContext,
+ })
+ }>
+ {loginAttemptInfo.contactMethod === "EMAIL"
+ ? t("PWLESS_SIGN_IN_UP_CHANGE_CONTACT_INFO_EMAIL")
+ : t("PWLESS_SIGN_IN_UP_CHANGE_CONTACT_INFO_PHONE")}
+
+ ) : (
+ claim.loading === false &&
+ (claim.value?.n.length ?? 0) > 1 && (
+
+ {t("PWLESS_MFA_FOOTER_CHOOSER_ANOTHER")}
+
+ )
+ )}
+
+
+ {t("PWLESS_MFA_LOGOUT")}
+
+
+ );
+ }
+);
diff --git a/lib/ts/recipe/passwordless/components/themes/mfa/mfaOTPHeader.tsx b/lib/ts/recipe/passwordless/components/themes/mfa/mfaOTPHeader.tsx
new file mode 100644
index 000000000..60837edac
--- /dev/null
+++ b/lib/ts/recipe/passwordless/components/themes/mfa/mfaOTPHeader.tsx
@@ -0,0 +1,61 @@
+/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved.
+ *
+ * This software is licensed under the Apache License, Version 2.0 (the
+ * "License") as published by the Apache Software Foundation.
+ *
+ * You may not use this file except in compliance with the License. You may
+ * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+import { Fragment } from "react";
+
+import { withOverride } from "../../../../../components/componentOverride/withOverride";
+import { useTranslation } from "../../../../../translation/translationContext";
+import BackButton from "../../../../emailpassword/components/library/backButton";
+import { MultiFactorAuthClaim } from "../../../../multifactorauth";
+import { useClaimValue } from "../../../../session";
+
+import type { MFAOTPHeaderProps } from "../../../types";
+
+export const MFAOTPHeader = withOverride(
+ "PasswordlessMFAOTPHeader",
+ function PasswordlessMFAOTPHeader({
+ loginAttemptInfo,
+ onBackButtonClicked,
+ isSetupAllowed,
+ }: MFAOTPHeaderProps): JSX.Element {
+ const t = useTranslation();
+ const claim = useClaimValue(MultiFactorAuthClaim);
+
+ return (
+