title: Unable to decode base64 from req.header.authorization
body: <p>In express I am grabbing the basic auth from: </p>
  
  <pre><code>req.headers.authorization
  </code></pre>
  
  <p>From that I get back </p>
  
  <pre><code>dXNlcm5hbWU6cGFzc3dvcmQ=
  </code></pre>
  
  <p>I say "hey that looks like base64". I quickly go to one of those <a href="https://www.base64decode.org/" rel="noreferrer">base64 sites</a> and decode it and it turns out to be '<code>username:password</code>'. So I google how to decode base64 in express 4. I wind up with this code:</p>
  
  <pre><code>console.log(new Buffer(req.headers.authorization.toString(), 'base64').toString('ascii'));
  </code></pre>
  
  <p>That is returning: </p>
  
  <pre><code>+"qUMI95iAMM]=I
  </code></pre>
  
  <p>Which is not <code>username:password</code>. I also tried this with the <code>utf8</code> setting and that did not work either. I also tried this without <code>toString()</code> on the <code>req.headers.authorization</code>. How do I properly decode base64 with expressjs?</p>