title: PyJWT returning invalid token signatures
body: <p>I'm using PyJWT==1.4.2 to generate tokens that I intend to use for Firebase authentication. </p>
  
  <p>Unfortunately I'm not able to use any of the third-party Python Firebase libraries, and even if I could I had the same difficulty when I tried with FirebaseTokenGenerator.</p>
  
  <p>Inside of my API, I have a function for generating a token for a username.</p>
  
  <pre><code>118     def generate_token(self, username):
  119         payload = {
  120             'something': 'Here',
  121         }   
  122         secret = "TESTSECRET"
  123         token = jwt.encode(
  124             payload,
  125             secret,
  126             algorithm='HS256')
  127         return token
  </code></pre>
  
  <p>An example of a token I get from this function is:</p>
  
  <blockquote>
    <p><code>eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzb21ldGhpbmciOiJIZXJlIn0.fpIMSRJ3AAL30LIDwHJM9ZOumdRzS7yooiiUgMPms2Y</code></p>
  </blockquote>
  
  <p>Unfortunately, this is not a valid token. Online resource such as <a href="https://jwt.io/" rel="noreferrer">https://jwt.io/</a> are telling me that the signature portion is invalid. </p>
  
  <p>Not sure if this is further helpful info, but when I try decoding the token I get the following:</p>
  
  <pre><code>b'{"alg":"HS256","typ":"JWT"}{"something"[83 chars]\x88'
  </code></pre>
  
  <p>Any thoughts on what I might be doing wrong? </p>