Can't encode token with .pem secret on Windows
Opened this issue · 3 comments
Summary
I am trying to encode a token on Windows using the following command:
jwt encode --alg RS256 --exp "+60 sec" --iss <issuer> --secret=@<key_name>.pem
I am getting the errors:
Something went awry creating the jwt
InvalidKeyFormat
The same key in .pem
format works with the same command when I run it on Mac. Any ideas why there is an issue on Windows?
Steps to reproduce
- Download and extract release 4.0.0 (https://github.com/mike-engel/jwt-cli/releases/download/4.0.0/jwt-windows.tar.gz)
- Run above command on Windows machine
Expected behavior
Equivalent .pem secret works the same on Windows as it does on Mac.
Hey @alexcampbell86, thanks for your patience on this! Do you have a .pem
file you could share? I just changed the test suite to run on windows as well (not sure why it didn't before) and everything passes. Could you also try it again with the latest version (5.0.0
)?
@mike-engel I was impacted by this issue today. What would you need to triage?
@marcb a .pem
file that's valid, and ideally works on macos but fails on windows would be good. Once I have that, I can add it to the test suite and it should start failing on the windows test suite and I can hopefully fix the bug.