>>"It is fairly obvious that I should insert my own application specific code at this point to present the question to the user in way that is supported on my system. And I can handle that."
Cypress--> You just have to set the security mode as "Authenticated pairing with LE secure connections" in the BLE configurator tab. The BLE stack can generate a code and display it on both central and peripheral devices. However you can also set the passkey using the API CyBle_GapFixAuthPassKey().
The API CyBle_GapAuthPassKeyReply(cyBle_connHandle.bdHandle, numcompkey, CYBLE_GAP_ACCEPT_PASSKEY_REQ); is used to return the status (correct/incorrect) of the passkey entered from the user.
Please find the attached projects which has the implementation for Numeric comparison method.