Closed rlaferla closed 5 years ago
You have a few options, but no explicit built-in support for what you're trying.
1) You can call new Jwt(claims, false)
( https://github.com/jwtk/njwt/blob/master/index.js#L140 ) to prevent the .jti
from being added, but that will also remove the default addition of iat
.
2) You can delete jwt.body.jti
before calling .compact()
on the JWT. (untested, but looks clean)
Once the JWT is signed (via compact()) you are out of options to change it.
I don't want the jti. How do I remove it?