[BUG] Not possible to set expiresIn or canonicalize when creating a VC
nikolockenvitz opened this issue ยท comments
Hello,
I was not able to create a VC with an expiry time. I see no way of setting the option expiresIn
of the underlying library did-jwt
because I cannot inject further options in the second argument.
// did-jwt
export async function createJWT(
payload: Partial<JWTPayload>,
{ issuer, signer, alg, expiresIn, canonicalize }: JWTOptions,
header: Partial<JWTHeader> = {}
): Promise<string> { // ...
Lines 75 to 85 in 170ab40
Similarly, canonicalize
in the JWTOptions (did-jwt
) cannot be set.
Good catch!
Are you willing to contribute a PR with a fix?
I noticed that expiration time can also be defined by setting exp
directly in the payload. However, for canonicalize
such workarounds are not possible and using expiresIn
might also be more comfortable to use in some cases.
๐ This issue has been resolved in version 2.1.7 ๐
The release is available on:
Your semantic-release bot ๐ฆ๐