diff --git a/shared/cryptoutil/cryptoUtil.ts b/shared/cryptoutil/cryptoUtil.ts index 6c41cb100b..1da431e67f 100644 --- a/shared/cryptoutil/cryptoUtil.ts +++ b/shared/cryptoutil/cryptoUtil.ts @@ -188,7 +188,7 @@ export async function getJWT( ) { try { const header64 = encodeB64(JSON.stringify(header)); - const payLoad64 = encodeB64(JSON.stringify(payLoad)); + const payLoad64 = encodeB64(forge.util.encodeUtf8(JSON.stringify(payLoad))); const preHash = header64 + '.' + payLoad64; const signature64 = await createSignature( privateKey,