forked from trent_larson/crowd-funder-for-time-pwa
misc tweaks and linting clean-up
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import asn1 from "asn1-ber";
|
||||
import { Buffer } from "buffer/";
|
||||
import { decode as cborDecode } from "cbor-x";
|
||||
import { bytesToMultibase, JWTPayload, multibaseToBytes } from "did-jwt";
|
||||
@@ -195,12 +194,12 @@ export class PeerSetup {
|
||||
allowCredentials: [
|
||||
{
|
||||
id: credentialId,
|
||||
type: "public-key",
|
||||
type: "public-key" as const,
|
||||
},
|
||||
],
|
||||
challenge: this.challenge.buffer,
|
||||
rpID: window.location.hostname,
|
||||
userVerification: "preferred",
|
||||
userVerification: "preferred" as const,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -209,7 +208,7 @@ export class PeerSetup {
|
||||
|
||||
this.authenticatorData = credential?.response.authenticatorData;
|
||||
const authenticatorDataBase64Url = arrayBufferToBase64URLString(
|
||||
this.authenticatorData,
|
||||
this.authenticatorData as ArrayBuffer,
|
||||
);
|
||||
|
||||
this.clientDataJsonBase64Url = arrayBufferToBase64URLString(
|
||||
@@ -249,6 +248,9 @@ export class PeerSetup {
|
||||
return jwt;
|
||||
}
|
||||
|
||||
// To use this, add the asn1-ber library and add this import:
|
||||
// import asn1 from "asn1-ber";
|
||||
//
|
||||
// return a low-level signing function, similar to createJWS approach
|
||||
// async webAuthnES256KSigner(credentialID: string) {
|
||||
// return async (data: string | Uint8Array) => {
|
||||
|
||||
Reference in New Issue
Block a user