feat: switch to the SimpleSigner code for working signatures

This commit is contained in:
2023-01-07 23:37:38 -07:00
parent d3e590822e
commit 693df1bda1

View File

@@ -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;
};