title: How to properly verify a token in Firebase Authentication
body: <p>I have a React Native App that successfully logs in a user via Phone OTP using Firebase.
  Upon logging in the following data gets returned:</p>
  <blockquote>
  <p>{&quot;additionalUserInfo&quot;: {&quot;isNewUser&quot;: false, &quot;profile&quot;: null,
  &quot;providerId&quot;: &quot;phone&quot;, &quot;username&quot;: null}, &quot;user&quot;: {&quot;displayName&quot;:
  null, &quot;email&quot;: null, &quot;emailVerified&quot;: false, &quot;isAnonymous&quot;: false,
  &quot;metadata&quot;: [Object], &quot;phoneNumber&quot;: &quot;+123456644&quot;, &quot;photoURL&quot;: null,
  &quot;providerData&quot;: [Array], &quot;providerId&quot;: &quot;firebase&quot;, &quot;refreshToken&quot;:
  &quot;AFxQ4_reXvXb6-L_9SWC4SCHVqxl9Rv6zWDdC_BTXySuk-MOfbjrzc4WcrIwF7XqY0zkl-XT7eQtczt1jOg1HUDQ2-Nj6yDJWZRXOMuFKTn5Ddzj9mIz1Lxigmww0Lfo1-vmErUJ_-EX2JLMD7nqep6WhuOxOMtttXUaWy5XHIUgkgzN8fHJwS9sMV3Q0A8leTAkxURbp0zlw4-5SoRBu_a-EPHWsWAY-g&quot;,
  &quot;tenantId&quot;: null, &quot;uid&quot;: &quot;Tx90EgWkSCf6M23KjsfH5Cf5vIv1&quot;}}</p>
  </blockquote>
  <p>As you can see from the above data the uid is <code>Tx90EgWkSCf6M23KjsfH5Cf5vIv1</code></p>
  <p>In order to test the verifyIdToken function of the Auth of Firebase I then use the above uid and pass it in the method:</p>
  <pre><code>admin
      .auth()
      .verifyIdToken('Tx90EgWkSCf6M23KjsfH5Cf5vIv1')
      .then((decodedToken) =&gt; {
          console.log('decodedToken', decodedToken)
      })
      .catch((error) =&gt; {
          //Handle error
          console.log('error', error)
      })
  </code></pre>
  <p>I then get the following error:</p>
  <pre><code>errorInfo: {
      code: 'auth/argument-error',
      message: 'Decoding Firebase ID token failed. Make sure you passed the entire string JWT which represents an ID token. See https://firebase.google.com/docs/auth/admin/verify-id-tokens for details on how to retrieve an ID token.'
    },
    codePrefix: 'auth'
  }
  </code></pre>
  <p>How to fix this?</p>