diff --git a/apps/web/src/main.tsx b/apps/web/src/main.tsx index 1770bc8..33efef8 100644 --- a/apps/web/src/main.tsx +++ b/apps/web/src/main.tsx @@ -49,10 +49,8 @@ const Page = (props: PageProps) => {
{header ? header : }
@@ -60,7 +58,7 @@ const Page = (props: PageProps) => { {errorStore.message} @@ -171,7 +195,7 @@ export default function Authenticate({ type }: { type: AuthenticateType }) { providerText={providerText} handleProvider={handleProvider} /> */} -
+
{type === AuthenticateType.LOGIN ? ( <> diff --git a/apps/web/src/pages/EmailSignIn.tsx b/apps/web/src/pages/EmailSignIn.tsx deleted file mode 100644 index bfb9e25..0000000 --- a/apps/web/src/pages/EmailSignIn.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import { isSignInWithEmailLink, signInWithEmailLink } from "firebase/auth" -import { route } from "preact-router" -import { useEffect } from "preact/hooks" -import { auth } from "../vendor/firebase" - -export default function EmailLanding() { - useEffect(() => { - if (isSignInWithEmailLink(auth, window.location.href)) { - // Additional state parameters can also be passed via URL. - // This can be used to continue the user's intended action before triggering - // the sign-in operation. - // Get the email if available. This should be available if the user completes - // the flow on the same device where they started it. - let email = window.localStorage.getItem("emailForSignIn") - while (!email) { - // User opened the link on a different device. To prevent session fixation - // attacks, ask the user to provide the associated email again. For example: - email = window.prompt("Please provide your email for confirmation") - } - // The client SDK will parse the code from the link for you. - signInWithEmailLink(auth, email, window.location.href).then(() => { - window.localStorage.removeItem("emailForSignIn") - }) - } - route("/", true) - }, []) - - return null -}