Nevis Mobile Authentication SDK React Native plugin
    Preparing search index...

    Class PasswordChangeAbstract

    The object that can be used to change the password.

    Usage example:

    class PasswordChangerImpl implements PasswordChanger {
    async changePassword(context: PasswordChangeContext, handler: PasswordChangeHandler) {
    handler.passwords(oldPassword, newPassword);
    }
    }

    [...]
    async changePassword({
    client: MobileAuthenticationClient,
    username: string,
    }): Promise<void> {
    await client.operations.passwordChange
    .username(username)
    .passwordChanger(PasswordChangerImpl(...))
    .onSuccess(() {
    // handle success
    })
    .onError((error) {
    // handle error
    })
    .execute();
    }
    [...]

    Hierarchy (View Summary)

    Index

    Methods

    • Executes the operation asynchronously.

      Returns Promise<void>

    • The username whose password must be changed.

      IMPORTANT
      Providing the username is required.

      WARNING
      The username is the technical user identifier stored in the Account.username property. Do not provide the login identifier (for example the users e-mail address) here. We recommend always using the username provided via LocalData.accounts.

      Parameters

      • username: string

        the username.

      Returns PasswordChange

      a PasswordChange object.

    • Specifies the object that will be invoked if the password was successfully modified.

      IMPORTANT
      Providing the onSuccess is required.

      Parameters

      • onSuccess: () => void

        the callback which is invoked on successful password modification.

      Returns PasswordChange

      a PasswordChange object.