During a FIDO2 authentication operation, the server tries to determine if your device has a FIDO2 registration. In some cases the server finds a registration, but it can't determine if the registration is on the current device or on a different device. In this case the App SDK uses the built-in Try Passwordless UI to inform the user with one of the following dialogs:
|
To replace these default dialogs with your own custom UI, your custom UI class must implement the ITryFidoUi interface. In addition, an object of the Digipass S3 default UI class is created by the Digipass S3 TryFidoUiFactory. Therefore, you must set an instance of TryFidoUiFactory that can create an object of your custom UI.
Take these steps to define your custom UI class and set up the factory to create an object of your custom UI:
Create a custom class that implements your UI. For example, call it SampleTryFidoUI. SampleTryFidoUI includes a constructor that takes a boolean parameter isHybridMode, which affects the UI you present.
If isHybridMode is true, the user's registration is most likely available on another device.
If isHybridMode is false, the user's registration is most likely available on the current device.Declare that your custom UI class implements the ITryFidoUi interface. To satisfy this interface, define the following method in theSampleTryFidoUI:
boolean openUI(ActivityProxy callerActivityProxy);Define a new factory class that implements the TryFidoUiFactory interface. For example, call this new class SampleTryFidoUiFactory. To satisfy the TryFidoUiFactory interface, define the following methods in your class SampleTryFidoUiFactory: createTryFidoUiInstance() and createTryHybridUiInstance().
class SampleTryFidoUiFactory : TryFidoUiFactory() {
override fun createTryFidoUiInstance(): ITryFidoUi {
return SampleTryFidoUI(false)
}
override fun createTryHybridUiInstance(): ITryFidoUi {
return SampleTryHybridUI(true)
}
}Refer to the Client API Docs for the ITryFidoUi interface and the TryFidoUiFactory class for more details.
Working examples in Tutorial app
See SampleTryFidoUI.kt. This class replaces the App SDK class DefaultTryFidoUi. Here is the code in the Tutorial App that activates the new behavior.
// Replace the default Try Passwordless authentication UI
if (TutorialAppPlus.replaceTryPasswordlessAndUseAnotherDeviceUIs) {
TryFidoUiFactory.setInstance(SampleTryFidoUiFactory()) }Set the following value to true in the file TutorialAppPlus.kt.
const val replaceTryPasswordlessAndUseAnotherDeviceUIs = true
.jpg?sv=2026-02-06&spr=https&st=2026-09-30T03%3A54%3A15Z&se=2026-09-30T04%3A05%3A15Z&sr=c&sp=r&sig=%2Fd44f%2FlqcGv6KeNjl5sZwkELwXWOie6lDkYf8rBKtfU%3D)