Change PIN
The OneWelcome React Native SDK exposes a function changePin to allow the currently logged in user to change their PIN. The user is first requested to provide their current PIN, before being allowed to create the new PIN. The flow for this is communicated through pinEvents which have to be handled by the application. An example of this can be found in usePinFlow in the example app.
Example code to change PIN of currently logged in user:
Note that the PIN entered by the user should not be stored on the device or elsewhere in any shape or form. The OneWelcome React Native SDK takes care of this for you in a secure manner.