ForgeRock Developer Experience

Set up QR code handling

Applies to:

  • ForgeRock SDK for Android

  • ForgeRock SDK for iOS

  • ForgeRock SDK for JavaScript

The ForgeRock JavaScript SDK has the following methods for handling QR codes:


For determining if a step requires a QR code.


For extracting the QR code data from the step, such as the URI.


// Import the module
import { FRQRCode } from ‘@forgerock/javascript-sdk’;

// Determine if a step is a QR code step
const isQRCode: boolean = FRQRCode.isQRCodeStep(step);

if (isQRCode) {
  // Extract QR code data
  const data: {
    message: string,
    use: string,
    uri: string
  } = FRQRCode.getQRCodeData(step);

  // Render a QR code using the `data` from the step

Copyright © 2010-2024 ForgeRock, all rights reserved.