summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--packages/typescript-types/src/index.ts14
1 files changed, 14 insertions, 0 deletions
diff --git a/packages/typescript-types/src/index.ts b/packages/typescript-types/src/index.ts
index 71e888b..4411fec 100644
--- a/packages/typescript-types/src/index.ts
+++ b/packages/typescript-types/src/index.ts
@@ -56,6 +56,20 @@ export type AssertionCredentialsJSON = {
};
/**
+ * The value returned from navigator.credentials.create()
+ */
+export interface AttestationCredential extends PublicKeyCredential {
+ response: AuthenticatorAttestationResponse;
+}
+
+/**
+ * The value returned from navigator.credentials.get()
+ */
+export interface AssertionCredential extends PublicKeyCredential {
+ response: AuthenticatorAssertionResponse;
+}
+
+/**
* A slightly-modified AuthenticatorAttestationResponse to simplify working with ArrayBuffers that
* are base64-encoded in the browser so that they can be sent as JSON to the server.
*/