title: Return a string from onCall firebase cloud function
body: <p>I'm studying firebase cloud function and trying to register a user at firebase auth using javascript and the cloud functions.
  What I want to do is to send the data to the cloud function, return data from the cloud function, and then use it on the web app. How can I do it? Here are both codes:</p>
  
  <p>Javascript sends values, which is working well:</p>
  
  <pre><code>const sendData = firebase.functions().httpsCallable('registerUser');
      sendData({
          email: userEmail,
          password: userPassword
  
      });
  </code></pre>
  
  <p>and here, my cloud function, which is registering the user correctly.</p>
  
  <pre><code>exports.registerUser = functions.https.onCall((data, context) =&gt; {
  const userEmail = data.email;
  const userPassword = data.password;
  
      admin.auth().createUser({
          email: userEmail,
          emailVerified: false,
          password: userPassword,
          displayName: "name",
          photoURL: "...", 
          disabled: false
      })
      .then(() =&gt; {
          //want to return messages if succeed or not
  
        }) });
  </code></pre>
  
  <p>I want to send the messages from the cloud function and then get it on my javascript code. How can I do it?</p>