How to lock the Pin Plugin after it gets unlocked in custom Pin Page?

Hi Everyone,
Anyone have any idea how to lock the Pin Plugin while using the custom Pin Screen.
Currently we have created a custom pin page and using Pin.submit() to get it unlocked, but once it is unlocked it is not getting locked again.

  1. We gave correct pin in Pin.submit(), it got unlocked.
  2. consider the case: app got reloaded again.
  3. Now if we try Pin.unlocked() it is returning true.
    Any suggestions how to lock the pin again once user leaves the custom page ?

If you’d like to have a Pin.lock() method you can file an issue here: metrological-sdk/index.js at master · Metrological/metrological-sdk · GitHub
Or even open a PR.

Alternatively, after user submits you can destroy the Pin component and recreate it next time the user visits. That will reset it fully.

1 Like