Options
All
  • Public
  • Public/Protected
  • All
Menu

Class FRWebAuthn

Utility for integrating a web browser's WebAuthn API.

Example:

// Determine if a step is a WebAuthn step
const stepType = FRWebAuthn.getWebAuthnStepType(step);
if (stepType === WebAuthnStepType.Registration) {
  // Register a new device
  await FRWebAuthn.register(step);
} else if (stepType === WebAuthnStepType.Authentication) {
  // Authenticate with a registered device
  await FRWebAuthn.authenticate(step);
}

Hierarchy

  • FRWebAuthn

Index

Methods

Static authenticate

Static createAuthenticationPublicKey

Static createRegistrationPublicKey

Static getAuthenticationCredential

  • getAuthenticationCredential(options: PublicKeyCredentialRequestOptions): Promise<PublicKeyCredential | null>
  • Retrieves the credential from the browser Web Authentication API.

    Parameters

    • options: PublicKeyCredentialRequestOptions

      The public key options associated with the request

    Returns Promise<PublicKeyCredential | null>

    The credential

Static getAuthenticationOutcome

  • getAuthenticationOutcome(credential: PublicKeyCredential | null): string

Static getCallbacks

Static getMetadataCallback

Static getOutcomeCallback

Static getRegistrationCredential

  • getRegistrationCredential(options: PublicKeyCredentialCreationOptions): Promise<PublicKeyCredential | null>
  • Retrieves the credential from the browser Web Authentication API.

    Parameters

    • options: PublicKeyCredentialCreationOptions

      The public key options associated with the request

    Returns Promise<PublicKeyCredential | null>

    The credential

Static getRegistrationOutcome

  • getRegistrationOutcome(credential: PublicKeyCredential | null): string

Static getTextOutputCallback

Static getWebAuthnStepType

Static register