TomDoesTech / REST-API-Tutorial-Updated

https://www.youtube.com/watch?v=BWUi6BS9T5Y
574 stars 283 forks source link

Private and public keys #18

Closed kelechinwaji closed 1 year ago

kelechinwaji commented 1 year ago

Hello, the private and public keys are throwing an error Error: secretOrPrivateKey must be an asymmetric key when using RS256 and Error: secretOrPrivateKey has a minimum key size of 2048 bits for RS256

poppyseedDev commented 1 year ago

To generate public and private keys you can go to the following website: https://cryptotools.net/rsagen and choose 2048 for the key length. The error that is thrown is because the length of the public and private keys are insufficient.

kelechinwaji commented 1 year ago

thank you