[SOLVED] Moralis + Next Auth

Hello, We are using the Moralis sdk v1, as we built our application on that.

I see the Moralis+NextAuth implementation in the newer moralis v2 docs, I want to integrate the same functionality with my ReactJS application and using the moralis-V1 sdk.

Is there any way, please let me know. @cryptokid @Yomoo

there is a different way of using the auth with moralis v2, there is an api specific to auth, you need a backend for that in order to make a request to the auth api and without having to save the api key in front end

you can use next js for that, new auth api and previous way of authenticating with a Moralis Server are totally different ways.

if you still want to use moralis v1 sdk you can self host a moralis server
you can get more info here:

Thanks @cryptokid for the prompt answer.

So this means that if we want to use the moralis v2 method, we have to have a endpoint which will authenticate, right?

And does moralis v2 only works with Next JS?

moralis v2 works with any other type of backend, next js is close to react

Okay, I meant React JS as my frontend and from React I call the API endpoint configured with moralis v2.

Does this work?

this doesn’t work mainly because you will have to hardcode the web3api key somewhere in order to call the API endpoint

1 Like

Hey another question, the moralis v2 API does not populate/store any user data directly to server created in Moralis dashboard?

As I didn’t found any configuration for my project set-up, to set up the Dapp URL or Application ID.

If you want to do something similar to how a Moralis server works you can look at the tutorial pasted above, you also have a video there, where parse server is used for self hosting and it works with Moralis v1 sdk

Thanks for the help @cryptokid, appreciate it. :raised_hands: