NextJS + Magic.Link tutorial lacking of request-message.js file: http://localhost:3000/api/auth/request-message 500 (Internal Server Error)

Hi everyone,

I have the following issue while moving my code to self-hosted Moralis server

Localhost:3000/signin app works well until I logged in with Magic.Link, then this error shows.

There is a function

const { data } = await axios.post(’/api/auth/request-message’, userData, {
headers: {
‘Content-Type’: ‘application/json’,
},
})

However, there is no request-message.js sample file anywhere. Except for react tutorial for Metamask (which turned out to be not-compatible with next).

Below is my .env file

APP_DOMAIN= sthsth

MORALIS_API_KEY=iM6E***LZl

NEXTAUTH_URL= http://localhost:3000

NEXTAUTH_SECRET=2****a

REACT_APP_SERVER_URL= http://localhost:1337/server

REACT_APP_APPLICATION_ID = 001

SKIP_PREFLIGHT_CHECK=true

Edit: Added request-message, now error 400 (request-message.js doesnt exist) became 500. (request-message.js exists but is blank)

hi, looks like the tutorial needs to be updated. we will fix this soon

Hi @properlydisaster, We have updated the tutorial in our docs. Please check again and follow the tutorial.
Let us know how it goes.

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.