Second pass
This commit is contained in:
@@ -231,10 +231,8 @@ const Page: React.FC<PageProps> = ({ appContext }) => {
|
||||
isTwoFactorPasskeysEnabled: true,
|
||||
});
|
||||
InMemoryStore.set(MS_KEYS.REDIRECT_URL, PAGES.ROOT);
|
||||
const url = passkeyVerificationRedirectURL(
|
||||
appName,
|
||||
passkeySessionID,
|
||||
);
|
||||
const url =
|
||||
passkeyVerificationRedirectURL(passkeySessionID);
|
||||
setPasskeyVerificationData({ passkeySessionID, url });
|
||||
openPasskeyVerificationURL({ passkeySessionID, url });
|
||||
throw Error(CustomError.TWO_FACTOR_ENABLED);
|
||||
|
||||
@@ -10,7 +10,7 @@ import { PAGES } from "../constants/pages";
|
||||
import type { PageProps } from "../types/page";
|
||||
|
||||
const Page: React.FC<PageProps> = ({ appContext }) => {
|
||||
const { appName, showNavBar } = appContext;
|
||||
const { showNavBar } = appContext;
|
||||
|
||||
const [loading, setLoading] = useState(true);
|
||||
const [host, setHost] = useState<string | undefined>();
|
||||
@@ -38,7 +38,7 @@ const Page: React.FC<PageProps> = ({ appContext }) => {
|
||||
) : (
|
||||
<VerticallyCentered>
|
||||
<FormPaper>
|
||||
<Login {...{ appName, signUp, host }} />
|
||||
<Login {...{ signUp, host }} />
|
||||
</FormPaper>
|
||||
</VerticallyCentered>
|
||||
);
|
||||
|
||||
@@ -10,7 +10,7 @@ import { SignUp } from "../components/SignUp";
|
||||
import type { PageProps } from "../types/page";
|
||||
|
||||
const Page: React.FC<PageProps> = ({ appContext }) => {
|
||||
const { appName } = appContext;
|
||||
const { showNavBar } = appContext;
|
||||
|
||||
const [loading, setLoading] = useState(true);
|
||||
const [host, setHost] = useState<string | undefined>();
|
||||
@@ -24,7 +24,7 @@ const Page: React.FC<PageProps> = ({ appContext }) => {
|
||||
router.push(PAGES.VERIFY);
|
||||
}
|
||||
setLoading(false);
|
||||
appContext.showNavBar(true);
|
||||
showNavBar(true);
|
||||
}, []);
|
||||
|
||||
const login = () => {
|
||||
@@ -37,7 +37,7 @@ const Page: React.FC<PageProps> = ({ appContext }) => {
|
||||
<EnteSpinner />
|
||||
) : (
|
||||
<FormPaper>
|
||||
<SignUp {...{ appName, login, router, host }} />
|
||||
<SignUp {...{ login, router, host }} />
|
||||
</FormPaper>
|
||||
)}
|
||||
</VerticallyCentered>
|
||||
|
||||
Reference in New Issue
Block a user