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

    Class PinChangeAbstract

    The object that can be used to change the PIN.

    Usage example:

    class PinChangerImpl implements PinChanger {
    async changePin(context: PinChangeContext, handler: PinChangeHandler) {
    handler.pins(oldPin, newPin);
    }
    }

    [...]
    async changePin({
    client: MobileAuthenticationClient,
    username: string,
    }): Promise<void> {
    await client.operations.pinChange
    .username(username)
    .pinChanger(PinChangerImpl(...))
    .onSuccess(() {
    // handle success
    })
    .onError((error) {
    // handle error
    })
    .execute();
    }
    [...]

    Hierarchy (View Summary)

    Index

    Methods

    • Executes the operation asynchronously.

      Returns Promise<void>

    • The username whose PIN 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 user's email address) here. We recommend always using the username provided via LocalData.accounts.

      Parameters

      • username: string

        the username.

      Returns PinChange

      a PinChange object.

    • Specifies the object that will be informed of the potential recoverable errors and is responsible for obtaining the PIN from the end-user.

      Important

      Providing the pinChanger is required.

      Parameters

      Returns PinChange

      a PinChange object.

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

      Important

      Providing the onSuccess callback is required.

      Parameters

      • onSuccess: () => void

        the callback which is invoked on successful PIN modification.

      Returns PinChange

      a PinChange object.

    • Specifies the object that will be invoked when the PIN could not be changed: the PIN was not enrolled, the PIN is locked or the operation was canceled.

      Important

      Providing the onError callback is required.

      Parameters

      Returns PinChange

      a PinChange object.