From 9d566fa977fe4dece3aabbc98fbf38d726a54331 Mon Sep 17 00:00:00 2001 From: Trent Larson Date: Fri, 6 Jan 2023 19:25:53 -0700 Subject: [PATCH] fix: use SimpleSigner directly from did-jwt --- 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 8d8df5af..a71cec11 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; };