Add a new Trusted Device

Steps

There are 2 steps that's needed to add a new Trusted Device:

  1. Show the QR Code of the New Device

  2. Scan the New Device's QR Code using the Trusted Device

Step 1: Show the QR Code of the New Device

To show the QR Code of the new device:

TrustedDeviceHelper.startEnrollThisDeviceAsTrusted(this, this);

This will open an Activity with a QR Code that can be scanned from the Trusted Device.

Case 1: Successfully registered as a Trusted Device

Once it's scanned and registered successfully as, the Activity will show a success image, and close after 3 seconds.

Case 2: The new device is still not registered as a Trusted Device after 3 minutes

If after 3 minutes, the new device is still not registered as a Trusted Device, it will show an error message.

Step 2: Scanning the QR Code from a Trusted Device

To scan the QR Code from a Trusted Device, call the function:

TrustedDeviceHelper.startEnrollOtherDeviceAsTrusted(this, this);

This will open an Activity that opens the Camera. It will ask for permission to access the camera. When the QR Code is detected and scanned, it will automatically attempt to register the new device.

When the QR Code is detected and registered, the SDK will automatically show whether it was successful or if there's an error.

🎉 You're done!

Now you can authenticate from the new device without requiring approval.

Last updated