1

I've been working on using the MERN Stack to build my web apps, and the only way that I have found to connect to Mongo is using an API. I want to make sure my users' information stays private. So how would I go about doing that? Is it possible? If not, how should I connect React to my database?

Thanks for reading, and I'm sorry for any unclear information. I'm new to this and don't know how to convey my problem.

Vishah
  • 45
  • 1
  • 1
  • 7

1 Answers1

0

It doesn't matter if you are using the MEAN or the MERN stack. Authenticating APIs is pretty standard and for the most part, has been answered here on stackoverflow:

Please go to this link:

REST API Authentication.

What you are looking to do is using the OAuth authentication standard. There are organizations that provide these services. Auth0 and okta are examples.