-
{t("MULTI_FACTOR_CHOOSER_HEADER_TITLE")}
+
+ {props.showBackButton ? (
+
+ ) : (
+
+ {/* empty span for spacing the back button */}
+
+ )}
+ {t("MULTI_FACTOR_CHOOSER_HEADER_TITLE")}
+
+ {/* empty span for spacing the back button */}
+
+
);
}
diff --git a/lib/ts/recipe/multifactorauth/components/themes/factorChooser/index.tsx b/lib/ts/recipe/multifactorauth/components/themes/factorChooser/index.tsx
index 7f099d615..682b89e39 100644
--- a/lib/ts/recipe/multifactorauth/components/themes/factorChooser/index.tsx
+++ b/lib/ts/recipe/multifactorauth/components/themes/factorChooser/index.tsx
@@ -16,7 +16,6 @@
import { SuperTokensBranding } from "../../../../../components/SuperTokensBranding";
import { hasFontDefined } from "../../../../../styles/styles";
import UserContextWrapper from "../../../../../usercontext/userContextWrapper";
-import { useSessionContext } from "../../../../session";
import { ThemeBase } from "../themeBase";
import { FactorChooserFooter } from "./factorChooserFooter";
@@ -26,25 +25,21 @@ import { FactorList } from "./factorList";
import type { FactorChooserThemeProps } from "../../../types";
export function FactorChooserTheme(props: FactorChooserThemeProps): JSX.Element {
- const sessionContext = useSessionContext();
-
- if (sessionContext.loading === false && sessionContext.doesSessionExist === true) {
- return (
-