The App SDK provides a default UI to implement the Sign-in flow. This is implemented as a Fragment that first prompts for the username and then allows the user to select authentication methods. The sign-in page looks like this when the WebAuthn mode called "Conditional UI" is not enabled:

The method selection page looks like this:
.jpg?sv=2026-02-06&spr=https&st=2026-09-30T03%3A53%3A24Z&se=2026-09-30T04%3A05%3A24Z&sr=c&sp=r&sig=f4taGKOHawFzBJm677m9WZ8gI4Z7geth1U%2F9FCHTvUk%3D)
This authentication flow uses the Model-View-Controller (MVC) architecture which makes it easy to replace the UI without having to reimplement the core logic. To use your own UI, you need to provide your own implementation of the Fragment. Your Fragment (View or Fragment in the sequence diagram below) responds to user input by calling the AuthenticationController (Controller) functions to trigger the required functionality such as displaying candidate authentication sequences or performing the authentication (Model). The AuthenticationController calls back to your Fragment through the Live Data to show the updates.
To replace the authenticationUI:
Implement your own custom Fragment, extending BaseAdaptiveAuthFragment.
For your Fragment to receive notifications from the Authentication Controller, the App SDK provides class AuthenticationViewModel. This class is called Authentication Live Data in the diagram below. Include the following code in your Fragment so that the controller notifies your Fragment when it needs to update its list of authentication methods:
mModel = ViewModelProvider(this).get(AuthenticationViewModel::class.java)Implement your own custom UI factory inherited from AdaptiveAuthUIFactory. For example, call it SampleAdaptiveAuthUIFactory.
Initialize the SDK to use your custom UI factory by making the following call: AdaptiveAuthUIFactory.setInstance(SampleAdaptiveAuthUIFactory())
The following diagram illustrates the MVC flow when your app calls enable(AutoStart.SIGN_IN). The yellow boxes represent your code.
For transaction confirmation you do not display a sign-in page. In these cases your application calls enable() with an AutoStart mode other than SIGN_IN. The instructions in this section still apply. But when you call enable() with any of these other AutoStart modes, the authentication flow in the diagram below skips Steps 2 through 9.
.png?sv=2026-02-06&spr=https&st=2026-09-30T03%3A53%3A24Z&se=2026-09-30T04%3A05%3A24Z&sr=c&sp=r&sig=f4taGKOHawFzBJm677m9WZ8gI4Z7geth1U%2F9FCHTvUk%3D)
The steps in this diagram are described below:
Your application calls AdaptiveUI.getAuthenticationFragment().
The SDK calls your UI factory's createAuthFragment() method.
Your application shows the instance of BaseAdaptiveAuthFragment it just obtained.
Once your View is initialized, it calls onRefresh() from class AuthenticationController.
The Authentication Controller calls the Live Data's showSignInPage().
The Live Data object calls your Fragment's showSignInPage().
Your Fragment shows a form with a username input field. The default implementation of BaseAdaptiveAuthFragment will call the UI factory's createUsernameFragment() to get the fragment with username input.
The user enters their user ID.
Your Fragment calls the Authentication Controller's startAuthentication() and passes in the username.
The Controller calls the Server to get the list of authentication methods for the user.
If there are methods to display, the Controller calls the Live Data's setMethods() with the list of authentication methods.
When Live Data’s setMethods() is called, the observer on your Fragment is notified and the observer’s callback function is called.
Your Fragment displays the list of authentication methods.
The user selects a method.
Your Fragment calls the Controller's doAuthenticate() with the selected method.
The Controller triggers the selected authentication method.
On completion of the authentication, the Controller calls the Live Data's onOperationCompleted().
When Live Data’s onOperationCompleted() is called, the observer on your Fragment is notified and the observer’s callback function is called.
Refer to the Client API Docs for the AuthenticationController, AuthenticationViewModel, BaseAdaptiveAuthFragment and the AdaptiveAuthUIFactory classes.
Working Example in Tutorial App
Refer to file SampleAdaptiveAuthFragment.kt and SampleAdaptiveAuthUIFactory.kt for an example implementation.