Skip to main content

Multi-registration

About multi-registration

Our multi-registration feature allows you to activate and manage multiple independent registrations within a single mobile app. This is useful for apps that need to support multiple end-user accounts or identities concurrently.

Diagram showing multi-registration use case

Diagram showing multi-registration use case

Example use cases

  • Multiple end-users share the same mobile device, and each person needs to securely access their own account within the app. For example, this could be the case with family or colleagues sharing the same tablet.
  • An end-user has multiple accounts with separate authentication credentials for each, which they need to access on the same mobile device. For example, this could be the case if the end-user has a personal account and a business account.

How does multi-registration work?

To use multi-registration, you must create multiple controllers within the SDK, where each controller corresponds to a unique registration.

When you create a new controller for a multi-registration app, you need to give the controller a unique name. This name is then later used to identify the controller.

Handling push notifications

When you use our multi-registration feature, you may need to make considerations about how push notifications are handled.

A push notification indicates to the end-user that something is happening for one of the registrations in the app that requires attention, however:

  • There is no information in the push message that indicates for which registration the push was triggered.
  • The app does not know what controller to start the authentication for.

To handle this in your app, there are two alternatives:

Send information in the push payload

When you start an authentication, you have the option to set a pushPayload which is passed in the push notification. You can use this to give the app information about what controller to use.

Important

The push payload is not a secure channel. This means that you should not use it to share sensitive information such as secrets.

Verify on all controllers

When your end-user opens the app, start with iterating through all of controllers. You can run a startAuthentication to check if there is any ongoing activity for that registration.

How to implement multi-registration

To use our multi-registration feature, you only need to create multiple named controllers within the SDK; no additional configuration is required. The process for creating a controller is different for Android and iOS.

Android

To create a new controller with a unique name on Android:

Example: Create a named controller for Android
Controller controller = AndroidControllerFactory.getInstance(androidContext, "registrationA");

iOS

To initialise the EncapController with a unique name on iOS:

Example: Create a named controller for iOS
let controller = EncapController(name: "registrationA")