From d716ea010178e4910412d1dc3ec6e99bf84389e7 Mon Sep 17 00:00:00 2001 From: Dylan Staley <88163+dstaley@users.noreply.github.com> Date: Fri, 27 Mar 2026 12:26:43 -0500 Subject: [PATCH] fix(expo-passkeys): Use new lib DOM types --- .../src/ClerkExpoPasskeys.types.ts | 36 ------------------- packages/expo-passkeys/src/index.ts | 2 -- packages/expo-passkeys/tsconfig.json | 5 +-- 3 files changed, 3 insertions(+), 40 deletions(-) diff --git a/packages/expo-passkeys/src/ClerkExpoPasskeys.types.ts b/packages/expo-passkeys/src/ClerkExpoPasskeys.types.ts index 539cb7138d5..ff22c92ad3f 100644 --- a/packages/expo-passkeys/src/ClerkExpoPasskeys.types.ts +++ b/packages/expo-passkeys/src/ClerkExpoPasskeys.types.ts @@ -43,50 +43,14 @@ export type SerializedPublicKeyCredentialRequestOptions = Omit< challenge: string; }; -// The return type from the "get" native module. -export interface AuthenticationResponseJSON { - id: string; - rawId: string; - response: AuthenticatorAssertionResponseJSON; - authenticatorAttachment?: AuthenticatorAttachment; - clientExtensionResults: AuthenticationExtensionsClientOutputs; - type: PublicKeyCredentialType; -} - // The serialized response of the native module "create" response to be send back to clerk export type PublicKeyCredentialWithAuthenticatorAttestationResponse = ClerkPublicKeyCredentialWithAuthenticatorAttestationResponse & { toJSON: () => any; }; -interface AuthenticatorAssertionResponseJSON { - clientDataJSON: string; - authenticatorData: string; - signature: string; - userHandle?: string; -} - // The serialized response of the native module "get" response to be send back to clerk export type PublicKeyCredentialWithAuthenticatorAssertionResponse = ClerkPublicKeyCredentialWithAuthenticatorAssertionResponse & { toJSON: () => any; }; - -interface AuthenticatorAttestationResponseJSON { - clientDataJSON: string; - attestationObject: string; - authenticatorData?: string; - transports?: AuthenticatorTransportFuture[]; - publicKeyAlgorithm?: COSEAlgorithmIdentifier; - publicKey?: string; -} - -// The type is returned from from native module "create" response -export interface RegistrationResponseJSON { - id: string; - rawId: string; - response: AuthenticatorAttestationResponseJSON; - authenticatorAttachment?: AuthenticatorAttachment; - clientExtensionResults: AuthenticationExtensionsClientOutputs; - type: PublicKeyCredentialType; -} diff --git a/packages/expo-passkeys/src/index.ts b/packages/expo-passkeys/src/index.ts index 125f1f79014..d4d6f7d6ca8 100644 --- a/packages/expo-passkeys/src/index.ts +++ b/packages/expo-passkeys/src/index.ts @@ -1,13 +1,11 @@ import { Platform } from 'react-native'; import type { - AuthenticationResponseJSON, CredentialReturn, PublicKeyCredentialCreationOptionsWithoutExtensions, PublicKeyCredentialRequestOptionsWithoutExtensions, PublicKeyCredentialWithAuthenticatorAssertionResponse, PublicKeyCredentialWithAuthenticatorAttestationResponse, - RegistrationResponseJSON, SerializedPublicKeyCredentialCreationOptions, SerializedPublicKeyCredentialRequestOptions, } from './ClerkExpoPasskeys.types'; diff --git a/packages/expo-passkeys/tsconfig.json b/packages/expo-passkeys/tsconfig.json index 0b83924c354..ba72a15ff1d 100644 --- a/packages/expo-passkeys/tsconfig.json +++ b/packages/expo-passkeys/tsconfig.json @@ -1,7 +1,6 @@ { "compilerOptions": { "allowJs": true, - "baseUrl": ".", "declaration": true, "declarationMap": false, "esModuleInterop": true, @@ -20,7 +19,9 @@ "skipLibCheck": true, "sourceMap": false, "strict": true, - "target": "ES2019" + "target": "ES2019", + "types": ["node"], + "rootDir": "./src" }, "include": ["src"] }