diff --git a/lib/Mangrove-reviews.ts b/lib/Mangrove-reviews.ts index 921b89e..2e22e80 100644 --- a/lib/Mangrove-reviews.ts +++ b/lib/Mangrove-reviews.ts @@ -75,12 +75,12 @@ export class MangroveReviews { payload = MangroveReviews.cleanPayload(payload) const algo = 'ES256' const kid = await MangroveReviews.publicToPem(keypair.publicKey) - const jwk = await crypto.subtle.exportKey('jwk', keypair.publicKey) + const jwk = JSON.stringify(await crypto.subtle.exportKey('jwk', keypair.publicKey)) return await new SignJWT(payload) .setProtectedHeader({ alg: algo, kid, - jwk, + jwk: jwk, enc: "utf-8" }) .sign(keypair.privateKey); diff --git a/package.json b/package.json index ebe07da..eacb66e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mangrove-reviews-typescript", - "version": "0.0.5", + "version": "0.0.6", "description": "A library to interface with Mangrove.reviews", "main": "lib/index.ts", "scripts": {