Closed bigboypantson closed 2 years ago
We could change the signerKey to accept either string or object, then we can pass in an object with key and passphrase like the example below, jwt.sign accepts the following format.
jwt.sign
signingKey: { key: fs.readFileSync('/path/to/your/key.ext'), passphrase: 'secretpassphrase' }
I have tested this and it works with very few changes, let me know if you think this is a good idea and I will do the PR.
Thanks
Hey @bigboypantson sorry for the delay. This makes sense to me - feel free to open PR
@bigboypantson This is all set on main, I'll be releasing v10 shortly
We could change the signerKey to accept either string or object, then we can pass in an object with key and passphrase like the example below,
jwt.sign
accepts the following format.signingKey: { key: fs.readFileSync('/path/to/your/key.ext'), passphrase: 'secretpassphrase' }
I have tested this and it works with very few changes, let me know if you think this is a good idea and I will do the PR.
Thanks