title: react native google sign in - firebase invalid token
body: <p><strong>Fixed:</strong>
  So the token I receive from <code>react-native-google-signin</code> is not enough, I was also supposed to install firebase and auth with it as seen in the accepted answer, then use the token from <code>firebase</code>.</p>
  
  <p><strong>Original Post:</strong></p>
  
  <p>I am using <code>react-native-google-signin</code> to login user to an app, on sign-in I get a jwt token.</p>
  
  <p>On firebase I have the following https cloud function:</p>
  
  <pre><code>exports.verify = functions.https.onRequest((req, res) =&gt; {
    const tokenId = req.get('Authorization').split('Bearer ')[1];
    return admin.auth().verifyIdToken(tokenId)
      .then((decoded) =&gt; res.status(200).send(decoded))
      .catch((err) =&gt; res.status(401).send(err));
  });
  </code></pre>
  
  <p>When I send the token from <code>react-native-google-signin</code> for verification I get the following response:</p>
  
  <pre><code>{
      "code": "auth/argument-error",
      "message": "Firebase ID token has incorrect \"aud\" (audience) claim. Expected \"my-project\" but got \"1232345345-sdfsdfsdfsdf.apps.googleusercontent.com\". Make sure the ID token comes from the same Firebase project as the service account used to authenticate this SDK. See https://firebase.google.com/docs/auth/admin/verify-id-tokens for details on how to retrieve an ID token."
  }
  </code></pre>
  
  <p>In this case the aud is the webclient ID from firebase google sign in authentication method of 'my-project'. 
  How would I fix this since it's firebase giving me the token and it's firebase rejecting the token ...</p>