/challenge/verify/evm request body

Even if I set the timeout to 60, the result is all the same.

Also I send the verify request instantly. It’s within a second.

const config = {
  domain: process.env.APP_DOMAIN,
  statement: 'please ...',
  uri: process.env.NEXTAUTH_URL,
  timeout: 60,
};

export default async function handler(req, res) {
  const { address, chain, network } = req.body;

  await Moralis.start({ apiKey: process.env.MORALIS_API_KEY });

  try {
    const message = await Moralis.Auth.requestMessage({
      address,
      chain,
      network,
      ...config,
    });

ok, then not the timeout is the issue, how does the message looks like now?

Now it’s like this

{
  "statusCode": 400,
   "name": "NotFoundException",
   "message": "Challenge not found, Timeout may have exceeded"
}

I mean the request that you send, what is the message there that was signed.

message is like this

"deblog.club wants you to sign in with your Ethereum account:\n0x41Dd2e751dF10b27356cd1790567Ba6C4B5d933b\n\n\nURI: http://localhost:3000\nVersion: 1\nChain ID: 1\nNonce: ub6VkbzlwN
q3ueHBM\nIssued At: 2022-09-28T08:42:01.303Z"

You may need to add more fields to that message, like not before

It’s because just I change the statement to blank when I Moralis.Auth.requestMessage.

const config = {
  domain: process.env.APP_DOMAIN,
  statement: '',
  uri: process.env.NEXTAUTH_URL,
  timeout: 60,
};

So the message is changed only statement part.

Try to test with 55 timeout, it may not matter

And to add more parameters/fields to that config

I changed 55 timeout and added all config listed here. But the response is all the same with 400 error.

and same error message as here?

yeah. I’m thinking I need to take another approach.

I still don’t know why the endpoint is not working for me.
It looks there is no solution.

if you generate a message with the swagger by editing those fields presented there, copy the generated message and try to validate it with an old signature, you get same error?