title: How can I retrieve the real password from a hashed password?
body: <p>I want to create a hybrid mobile application where the backend is Node js that it will save data in mongodb. my server works properly and I prepared routes for handling users requests.</p>
  
  <p>I'm using bcrypt to store password hashes in mongodb. Passwords are saved correctly but my problem that I can't retrieve the real password, for example, when admin pass a GET request to node js server in order to get user data, he get the hashed password in the front-end.</p>
  
  <p>this is the result in the front-end:</p>
  
  <p><a href="https://i.stack.imgur.com/VS4lG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VS4lG.png" alt="enter image description here"></a></p>
  
  <p>this is the code to store password hashes : </p>
  
  <pre><code>UserSchema.pre('save', function (next) {
      var user = this;
      if (this.isModified('password') || this.isNew) {
          bcrypt.genSalt(10, function (err, salt) {
              if (err) {
                  return next(err);
              }
              bcrypt.hash(user.password, salt, function (err, hash) {
                  if (err) {
                      return next(err);
                  }
                  user.password = hash;
                  next();
              });
          });
      } else {
          return next();
      }
  }); 
  </code></pre>
  
  <p>Please how can I retrieve the real password?</p>