diff options
author | vnugent <public@vaughnnugent.com> | 2024-06-04 11:47:20 -0400 |
---|---|---|
committer | vnugent <public@vaughnnugent.com> | 2024-06-04 11:47:20 -0400 |
commit | 1da3e983599b81dc9587f060131385a9a63ef1c6 (patch) | |
tree | 7fe25c46d0b53fbf18c4eb5be2dc614339c2611c /lib/vnlib.browser/src/mfa/fido.ts | |
parent | e8548467d945ccb286da595a02c816abb596439d (diff) | |
parent | 451091e93b5feee7a5e01d3a81f5d63efa7ea8be (diff) |
save latest dev updates
Diffstat (limited to 'lib/vnlib.browser/src/mfa/fido.ts')
-rw-r--r-- | lib/vnlib.browser/src/mfa/fido.ts | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/lib/vnlib.browser/src/mfa/fido.ts b/lib/vnlib.browser/src/mfa/fido.ts index 5eaa166..8d58616 100644 --- a/lib/vnlib.browser/src/mfa/fido.ts +++ b/lib/vnlib.browser/src/mfa/fido.ts @@ -46,6 +46,7 @@ export interface IFidoDevice{ interface FidoRegistration{ readonly id: string; + readonly friendlyName: string; readonly publicKey?: string; readonly publicKeyAlgorithm: number; readonly clientDataJSON: string; @@ -114,18 +115,19 @@ export const useFidoApi = (endpoint: MaybeRef<string>, axiosConfig?: MaybeRef<Ax return data.getResultOrThrow(); } - const registerCredential = async (registration: RegistrationResponseJSON, commonName: string): Promise<WebMessage> => { + const registerCredential = async (reg: RegistrationResponseJSON, commonName: string): Promise<WebMessage> => { - const response: FidoRegistration = { - id: registration.id, - publicKey: registration.response.publicKey, - publicKeyAlgorithm: registration.response.publicKeyAlgorithm!, - clientDataJSON: registration.response.clientDataJSON, - authenticatorData: registration.response.authenticatorData, - attestationObject: registration.response.attestationObject + const registration: FidoRegistration = { + id: reg.id, + publicKey: reg.response.publicKey, + publicKeyAlgorithm: reg.response.publicKeyAlgorithm!, + clientDataJSON: reg.response.clientDataJSON, + authenticatorData: reg.response.authenticatorData, + attestationObject: reg.response.attestationObject, + friendlyName: commonName } - const { data } = await axios.value.post<WebMessage>(ep(), { response, commonName }); + const { data } = await axios.value.post<WebMessage>(ep(), { registration }); return data; } |