Hi,
I followed Step 1 and 2 using NextJS (npx create-next-app ) .
For Step 3, my code is per below:
import Head from 'next/head';
import { useRouter } from "next/router";
import { useEffect } from "react";
import { useMoralis } from "react-moralis";
export default function Home() {
const { authenticate, isAuthenticated } = useMoralis();
const router = useRouter();
useEffect(() => {
if (isAuthenticated) router.push("/dashboard");
}, [isAuthenticated]);
return (
<div className="flex w-screen h-screen items-center justify-center">
<Head>
<title> Cypher Hash </title>
<meta name="description" content="Create your own NFT" />
<link rel="icon" href="/favicon.ico" />
</Head>
<button
onCLick={authenticate}
className="bg-blue-300 px-8 py-5 rounded-xl text-lg animate-pulse"
>
Login With MetaMask
</button>
</div>
);
}
I am unable to get a pop up screen to authenticate MetaMask login although I have added the serverURL and appID (obtained from Moralis.io) under .env.local.
I am using the Mumbai testnet for the application.
My "Login with Metamask " button does not prompt a Metamask authentication page.