title: Error: error:0909006C:PEM routines:get_name:no start line
body: <p>I am trying to verify a jwt using jsonwebtoken. When I am using:</p>
  
  <pre><code>jwt.verify(jwt, publicKey)
  </code></pre>
  
  <p>I am getting a : </p>
  
  <blockquote>
    <p>JsonWebTokenError {name: "JsonWebTokenError", message: "invalid
    algorithm", stack: "JsonWebTokenError: invalid algorithm }</p>
  </blockquote>
  
  <p>When I am using: </p>
  
  <pre><code>jwt.verify(jwt, publicKey, { algorithms: 'RS256'}) 
  </code></pre>
  
  <p>I am getting:</p>
  
  <blockquote>
    <p>Error: error:0909006C:PEM routines:get_name:no start line</p>
  </blockquote>
  
  <p>Any ideas? Is there an alternative to verify a jwt? </p>
  
  <p><strong>Update</strong></p>
  
  <p>The problem lies on the RS256 selection probably.</p>