There are Error 304 on â[GET] /api/auth/providersâ and on â[GET] /api/auth/csrfâ, then Error 401 on â[POST] /api/auth/callback/moralis-authâ
Were you able test the production build on localhost environment without any errors?
If yes, then can you share your production url? I will try to test it on my end.
I tried build on localhost environment. I have no error while building. But I have the same error locally. On localhost dev it works fine.
Here is the url to try : https://test-auth-g5h5f2n00-kroustof.vercel.app/signin
If you test this Moralis repo (https://github.com/MoralisWeb3/demo-apps/tree/main/nextjs_moralis_auth.) in production, do you have any issue to make it works ?
My repo is basically a copy paste of the authentication tutorial with NEXT JS, so I donât know what to doâŚ
It prompts normally when I click on login⌠I will try again
I deployed something long back. But not sure if your code is similar to mine.
https://moralisauth.vercel.app/signin
Yours works fine. But Moralis has recently updated their API and packge â@moralisweb3/nextâ with a new tutorial⌠It seems the problem may come from that
Yes, this is the same error
hmm, let me try deploying the latest version and I will get back to you.
If you have time, may I ask you to try to deploy the tutorial repo and see if it works to know if I am doing something wrong on my part
Here is the latest build. I copied the code directly from tutorial repo and updated the app. It seems to run without any error. You can also check my repo to compare your code.
Demo: https://moralisauth.vercel.app/user
GitHub: https://github.com/JohnVersus/demo-apps-nextjs_moralis_auth
Since your app is running without any error on localhost it could also be something related to the env variables added on the vercel. So maybe double-check if the variables related to the next-auth are added correctly.
I will clone your repo and try it. Obviously I am doing something wrong. I let you know if I get it right this time.
Thanks
By the way, did you use yarn or npm to install the packages ?
I used Yarn with the same yarn.lock file from the tutorial repo.
I used npm and I got a new error⌠I will try with yarn
It works ! BIG THANKS TO YOU. I finally found the issue, it was my node version (18) whereas next-auth works with node 16âŚ
Thanks for your time bro !