Device Activation Removal

You can remove activation using several ways - the choice depends on the desired behavior.

Simple Device-Only Removal

You can clear activation data anytime from the Keychain. The benefit of this method is that it does not require help from the server, and the user does not have to be logged in. The issue with this removal method is simple: The activation still remains active on the server side. This, however, does not have to be an issue in your case.

To remove only data related to PowerAuth, use:

await powerAuth.removeActivationLocal();

Removal via Signed Request

PowerAuth Standard RESTful API has a dedicated endpoint for activation removal. This endpoint uses authentication code verification to look up the activation to be removed. The benefit of this method is that it is already present in both PowerAuth Flutter SDK and PowerAuth Standard RESTful API - nothing has to be programmed. Also, the user does not have to be logged in to use it. By default, authenticate using 2FA with either a password or biometrics.

Use the following code for an activation removal using a signed request:

// 2FA signature, uses device-related key and user PIN code
final auth = PowerAuthAuthentication.password(await PowerAuthPassword.fromString("1234"));
try {
    await powerAuth.removeActivationWithAuthentication(auth);
    // activation removed
} catch (e) {
    // failed to remove
}

Removal with 1FA Authentication

PowerAuth RESTful Integration 2.1.0 and newer can be configured to allow activation removal with 1FA authentication. If this option is enabled on your server, you can remove the activation with possession-only authentication:

// 1FA signature, uses device-related key only
final auth = PowerAuthAuthentication.possession();
try {
    await powerAuth.removeActivationWithAuthentication(auth);
    // activation removed
} catch (e) {
    // failed to remove
}

If 1FA activation removal is not enabled on the server, or the server uses an older version of PowerAuth RESTful Integration, the removal requires 2FA authentication and a request authenticated with 1FA fails.

Last updated on Nov 03, 2026 (11:28) Edit on Github Send Feedback

develop

PowerAuth Mobile Flutter