Node-jsonwebtoken: PEM_read_bio:no start line

Created on 27 Aug 2018  路  5Comments  路  Source: auth0/node-jsonwebtoken

passing in RSA private key from env varaible to the jwt.sign. Results in PEM_read_bio:no start line

Most helpful comment

Had to put it all on one line, seperated by /n and remove all blank spaces

All 5 comments

Can you verify that your private key begins with -----BEGIN RSA PRIVATE KEY-----?

You can also verify your private key format using:

openssl rsa -in path/to/rsa-private.pem -check

Hello,

I have the same problem here. My key start with -----BEGIN PUBLIC KEY-----

@george-norris-salesforce Did you ever solve your problem and if so, how?

Had to put it all on one line, seperated by /n and remove all blank spaces

I had the same issue and none of the answers given here or else where did not work. Finally I found out that one of the '-' in -----BEGIN RSA KEY----- was missing. There need to 5 dashes exactly.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

prevostc picture prevostc  路  4Comments

usamamashkoor picture usamamashkoor  路  4Comments

dwelle picture dwelle  路  3Comments

ngminhduong picture ngminhduong  路  3Comments

BarukhOr picture BarukhOr  路  4Comments