title: firebase auth/invalid-custom-token
body: <p>I am trying to generate custom tokens with the firebase admin sdk</p>
  
  <pre><code>const uid = '91f0bf4c-3e3c-441c-a21d-6a7fee341db5'
  firebaseAdmin.auth().createCustomToken(uid)
  </code></pre>
  
  <p>With this specific uid sometimes the custom tokens work, other times when using authWithCustomToken() on the client side I get this error:</p>
  
  <blockquote>
    <p>“auth/invalid-custom-token”
    The custom token format is incorrect. Please check the documentation."</p>
  </blockquote>
  
  <p>Is there any way I can debug what is going on with the token? On the surface both the "good" tokens and the "bad" tokens look the same:</p>
  
  <p>They have 3 parts, separated by a <code>.</code></p>
  
  <ul>
  <li>The first part is 36 characters long and in both the working case and the broken case it is the exact same</li>
  <li>In both examples, the second part is 392 characters and they are almost the exact same</li>
  <li>The both examples, the third part is 342 characters long and they are different.</li>
  </ul>