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 default endpoint /pa/v3/activation/remove for activation removal. This endpoint uses a signature verification for looking 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. However, the user has to 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(PowerAuthPassword.fromString("1234"));
try {
    await powerAuth.removeActivationWithAuthentication(auth);
    // activation removed
} catch (e) {
    // failed to remove
}
Last updated on May 02, 2025 (14:06) Edit on Github Send Feedback
Search

1.0.0.beta

PowerAuth Mobile Flutter