Securing database credential with user, data database for mobile/web application

304 views Asked by At

I'm creating a mobile application with react-native and mongoDB (AWS mongoDB server). How to I store the user database creation credentials (need database admin access) to signup in application. Do I need any third party web server[I prefered MERN STACK Server] for the admin credentials to secure it?. Else how can I do this?. If I migrated from App to website (last choice) can I call the API (don't have even idea about API) or web-data securely?.

const MongoClient = require('mongodb').MongoClient;
const uri = "mongodb+srv://<username>:<password>@project-red.ddhvn.mongodb.net/<dbname>?retryWrites=true&w=majority";
const client = new MongoClient(uri, { useNewUrlParser: true });
client.connect(err => {
  const collection = client.db("test").collection("devices");
  // perform actions on the collection object
  client.close();
});

This is I got from the mongodb cluster.

How to encrypt these URL encoded data and store password data(for admin on a server) using crypt, mongodb-client-encryption and mongodb.

How to encrypt admin password and url-data in server?

0

There are 0 answers