There is no issue with page route. With Nexjs13 app route, the following script does not work
import { MoralisNextApi } from "@moralisweb3/next";
const options = {
apiKey: process.env.MORALIS_API_KEY,
authentication: {
domain: "amazing.dapp",
uri: process.env.NEXTAUTH_URL,
timeout: 120,
},
};
const handler = MoralisNextApi(options);
export { handler as GET, handler as POST };