Moralis authentication with NodeJS

Hi There,

I am using ReactJS for the frontend and Nodejs for the backend as REST API. I was successfully able to authenticate my user on frontend(Login them with magic.link or metamask), but how can i validate the loggedin user session on backend(NodeJS)?

Also, since my applications whole authentication is now integrated with moralis which i don’t feel good about. Is there are way i can authenticate the user only in/from backend?

you can check the user session in backend by connecting directly to your Moralis Server mongo db and reading from Session table.

Any doc i can follow to create connection to moralis db from nodejs app?

Same issue here, I need to authenticate the users in my NodeJs/Mysql application.
Any resource to do this ?

Are you using a frontend like OP? You could send the user’s session token to your backend and verify it from there.