Skip to content

Commit

Permalink
if signature is buffer, use alternative serialization function
Browse files Browse the repository at this point in the history
  • Loading branch information
tanghel committed Nov 12, 2023
1 parent 70c74ba commit fce62da
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/http/src/auth/native.auth.signer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ export class NativeAuthSigner {

const signature = signableMessage.getSignature();

const token = this.nativeAuthClient.getToken(signerAddress, signableToken, signature.hex());
const signatureHex = signature instanceof Buffer ? signature.toString('hex') : signature.hex();

const token = this.nativeAuthClient.getToken(signerAddress, signableToken, signatureHex);
const expiryDate = new Date().addSeconds(this.config.expirySeconds);

return this.accessTokenInfo = {
Expand Down

0 comments on commit fce62da

Please sign in to comment.