UNPKG

@clerk/expo-passkeys

Version:

Passkeys library to be used with Clerk for expo

61 lines 2.73 kB
import type { CredentialReturn, PublicKeyCredentialCreationOptionsWithoutExtensions, PublicKeyCredentialRequestOptionsWithoutExtensions, PublicKeyCredentialWithAuthenticatorAssertionResponse as ClerkPublicKeyCredentialWithAuthenticatorAssertionResponse, PublicKeyCredentialWithAuthenticatorAttestationResponse as ClerkPublicKeyCredentialWithAuthenticatorAttestationResponse } from '@clerk/shared/types'; export type { PublicKeyCredentialRequestOptionsWithoutExtensions, PublicKeyCredentialCreationOptionsWithoutExtensions, CredentialReturn, }; type AuthenticatorTransportFuture = 'ble' | 'cable' | 'hybrid' | 'internal' | 'nfc' | 'smart-card' | 'usb'; interface PublicKeyCredentialDescriptorJSON { id: string; type: PublicKeyCredentialType; transports?: AuthenticatorTransportFuture[]; } export type SerializedPublicKeyCredentialCreationOptions = Pick<PublicKeyCredentialCreationOptionsWithoutExtensions, 'authenticatorSelection' | 'pubKeyCredParams'> & { rp: { id: string; name: string; }; user: { id: string; displayName: string; name: string; }; challenge: string; excludeCredentials?: PublicKeyCredentialDescriptorJSON[]; }; export type SerializedPublicKeyCredentialRequestOptions = Omit<PublicKeyCredentialRequestOptionsWithoutExtensions, 'challenge'> & { challenge: string; }; export interface AuthenticationResponseJSON { id: string; rawId: string; response: AuthenticatorAssertionResponseJSON; authenticatorAttachment?: AuthenticatorAttachment; clientExtensionResults: AuthenticationExtensionsClientOutputs; type: PublicKeyCredentialType; } export type PublicKeyCredentialWithAuthenticatorAttestationResponse = ClerkPublicKeyCredentialWithAuthenticatorAttestationResponse & { toJSON: () => any; }; interface AuthenticatorAssertionResponseJSON { clientDataJSON: string; authenticatorData: string; signature: string; userHandle?: string; } export type PublicKeyCredentialWithAuthenticatorAssertionResponse = ClerkPublicKeyCredentialWithAuthenticatorAssertionResponse & { toJSON: () => any; }; interface AuthenticatorAttestationResponseJSON { clientDataJSON: string; attestationObject: string; authenticatorData?: string; transports?: AuthenticatorTransportFuture[]; publicKeyAlgorithm?: COSEAlgorithmIdentifier; publicKey?: string; } export interface RegistrationResponseJSON { id: string; rawId: string; response: AuthenticatorAttestationResponseJSON; authenticatorAttachment?: AuthenticatorAttachment; clientExtensionResults: AuthenticationExtensionsClientOutputs; type: PublicKeyCredentialType; } //# sourceMappingURL=ClerkExpoPasskeys.types.d.ts.map