Closed morremeyer closed 1 year ago
Hi @morremeyer, I had this same issue, and I think I know what the problem is. The -e
option requires an equal sign rather than whitespace between the option and the argument (e.g. -e="+60 sec"
), so your examples should look like this:
jwt encode --secret "@${SECRET_PATH}" -e="+60 sec" -i "0123456789" --alg RS256
jwt encode --secret "@${SECRET_PATH}" -e="60" -i "0123456789" --alg RS256
Hope this helps.
Thanks @AlexSeefeldt. This was an ugly side-effect of the update from clap 3 to 4 and the way that expires
argument works. It may be able to change back in the future. It's documented in the help output, but it's not incredibly helpful
Summary
When I try to set an expiration for a token in 6.0.0, it always errors with
This is on macOS Ventura 13.5.2
Steps to reproduce
Have a valid pem file on your machine. Then, run
and see that both output
However,
will work.
Expected behavior
Setting an expiration should work.