title: How to create “credential” object needed by Firebase web user.reauthenticate() method?
body: <pre><code>var user = firebase.auth().currentUser;
  var credential;
  // Prompt the user to re-provide their sign-in credentials
  user.reauthenticate(credential).then(function() {
  </code></pre>
  
  <p>With the v3 Firebase client, how should I create this credential object for Google auth provider (Not email &amp; Password).</p>
  
  <p>How to do it with email and password was answered here: <a href="https://stackoverflow.com/questions/37811684/how-to-create-credential-object-needed-by-firebase-web-user-reauthenticate-m">Email&amp;Password</a>.</p>
  
  <p>I've tried <code>var credential = firebase.auth.GoogleAuthProvider.credential();</code> but according to the <a href="https://firebase.google.com/docs/reference/js/firebase.auth.GoogleAuthProvider" rel="nofollow noreferrer">docs</a> it's needs an "Google Id Token" which I have no idea how to get.</p>