From 693df1bda1e21c9736d284e8bf1704dd6a6604ee Mon Sep 17 00:00:00 2001 From: Trent Larson Date: Sat, 7 Jan 2023 23:37:38 -0700 Subject: [PATCH] feat: switch to the SimpleSigner code for working signatures --- src/libs/crypto/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libs/crypto/index.ts b/src/libs/crypto/index.ts index 8d8df5a..a71cec1 100644 --- a/src/libs/crypto/index.ts +++ b/src/libs/crypto/index.ts @@ -122,7 +122,7 @@ export const accessToken = async (identifier: IIdentifier) => { : privateKeyHex; const privateKeyBytes = u8a.fromString(input.toLowerCase(), "base16"); - const signer = didJwt.ES256KSigner(privateKeyBytes, true); + const signer = didJwt.SimpleSigner(privateKeyHex); const nowEpoch = Math.floor(Date.now() / 1000); const endEpoch = nowEpoch + 60; // add one minute @@ -143,7 +143,7 @@ export const sign = async (privateKeyHex: string) => { : privateKeyHex; const privateKeyBytes = u8a.fromString(input.toLowerCase(), "base16"); - const signer = didJwt.ES256KSigner(privateKeyBytes, true); + const signer = didJwt.SimpleSigner(privateKeyHex); return signer; };