ForgeRock SDKs

Handle web biometrics

The ForgeRock JavaScript SDK has two methods for handling web biometrics:


For registering devices.


For authenticating using a previously registered device.

Use the FRWebAuthn.getWebAuthnStepType() convenience method to determine which method to use:

// Determine if a step is a web biometrics step
const stepType = FRWebAuthn.getWebAuthnStepType(step);

if (stepType === WebAuthnStepType.Registration) {
  // Registering a new device
  step = await FRWebAuthn.register(step);
} else if (stepType === WebAuthnStepType.Authentication) {
  // Authenticating with a registered device
  step = await FRWebAuthn.authenticate(step);

// `step` has now been populated with the web biometrics credentials

// Send this new step to the ForgeRock server
nextStep =;
Copyright © 2010-2023 ForgeRock, all rights reserved.