Force app update


As an app developer you might want to force your users to upgrade their outdated applications. The SDK, together with the Token Server provides the functionality to detect outdated applications and give you a possibility to handle this situation.

Administrator of the Token Server can disable specific app version (for more details please refer to the Token Server Administrator's Guide) which will prevent any client using it to perform authentication flow. To handle such scenario you should check if the type of error returned in the OneginiAuthenticationHandler#onError method is OneginiAuthenticationError.OUTDATED_APP:

OneginiClient.getInstance().getUserClient().authenticateUser(userProfile, new OneginiAuthenticationHandler() {

  public void onSuccess(final UserProfile userProfile, final CustomInfo customInfo) {
    // ...

  public void onError(final OneginiAuthenticationError error) {
    if (error.getErrorType() == OneginiAuthenticationError.OUTDATED_APP) {
      // Show that the end-user is using a wrong / outdated application version and an update is required.
    } else {
      // other error reason

Please use this handler method to notify the end-user that an application update is required.

Once the end-user has updated the application, the Token Server will detect that a newer application version is installed and perform the required steps to update the internal application configuration and validate whether the current application version is valid.