mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 00:03:56 +00:00
PM-21553: Added support for credential.toJSON() (#15028)
* Added support for credential.toJSON() * Changed to import type
This commit is contained in:
@@ -88,6 +88,7 @@ export class WebauthnUtils {
|
||||
getClientExtensionResults: () => ({
|
||||
credProps: result.extensions.credProps,
|
||||
}),
|
||||
toJSON: () => Fido2Utils.createResultToJson(result),
|
||||
} as PublicKeyCredential;
|
||||
|
||||
// Modify prototype chains to fix `instanceof` calls.
|
||||
@@ -134,6 +135,7 @@ export class WebauthnUtils {
|
||||
} as AuthenticatorAssertionResponse,
|
||||
getClientExtensionResults: () => ({}),
|
||||
authenticatorAttachment: "platform",
|
||||
toJSON: () => Fido2Utils.getResultToJson(result),
|
||||
} as PublicKeyCredential;
|
||||
|
||||
// Modify prototype chains to fix `instanceof` calls.
|
||||
|
||||
Reference in New Issue
Block a user