Password Management

Password Change

Since the device does not know the password and cannot verify it without the server, password changes use a two-step flow.

Two-Step Password Change

First validate the current password:

let changeData;
try {
    changeData = await powerAuth.beginPasswordChange("oldPassword");
} catch (e) {
    // Password validation or the network request failed.
    return;
}

After the user chooses and confirms the new password, finish the operation:

try {
    await powerAuth.finishPasswordChange("newPassword", changeData);
} catch (e) {
    // The change failed. The change data has already been released.
}

finishPasswordChange() always consumes and releases the opaque PowerAuthPasswordChangeData. If the flow is abandoned after the first step, release it explicitly:

await changeData.release();

Do not use password validation before calculating an authentication code. Handle an incorrect password in the authenticated operation and then use fetchActivationStatus() to check the remaining attempts or whether the activation is blocked.

Last updated on Sep 18, 2026 (08:10) Edit on Github Send Feedback

5.0.x

PowerAuth Mobile JS