summaryrefslogtreecommitdiffhomepage
path: root/packages/typescript-types
diff options
context:
space:
mode:
Diffstat (limited to 'packages/typescript-types')
-rw-r--r--packages/typescript-types/src/index.ts15
1 files changed, 8 insertions, 7 deletions
diff --git a/packages/typescript-types/src/index.ts b/packages/typescript-types/src/index.ts
index cab623c..3e52a5d 100644
--- a/packages/typescript-types/src/index.ts
+++ b/packages/typescript-types/src/index.ts
@@ -42,14 +42,8 @@ export type PublicKeyCredentialCreationOptionsJSON = {
*/
export type PublicKeyCredentialRequestOptionsJSON = {
publicKey: {
- //
challenge: string;
- allowCredentials: {
- // Will be converted to a Uint8Array in the browser
- id: string;
- type: 'public-key';
- transports?: AuthenticatorTransport[];
- }[];
+ allowCredentials: PublicKeyCredentialDescriptorJSON[];
// extensions?: AuthenticationExtensionsClientInputs,
rpId?: string;
timeout?: number;
@@ -57,6 +51,13 @@ export type PublicKeyCredentialRequestOptionsJSON = {
};
};
+export interface PublicKeyCredentialDescriptorJSON extends Omit<
+PublicKeyCredentialDescriptor, 'id'
+> {
+ // Should be a Base64-encoded credential ID. Will be converted to a Uint8Array in the browser
+ id: string;
+}
+
/**
* The value returned from navigator.credentials.create()
*/