EddyVerbruggen / cordova-plugin-touch-id

:nail_care: 👱‍♂️ Forget passwords, use a fingerprint scanner!
MIT License
214 stars 72 forks source link

Question: Flow for TouchId #86

Closed WuglyakBolgoink closed 4 years ago

WuglyakBolgoink commented 4 years ago

Hallo @ajcrites, @EddyVerbruggen,

can you please describe a little bit more to the flow, which we should do by using this plugin.

step-1: I call window.plugins.touchid.isAvailable() -> successCB -> goto step-2 -> errorCB -> goto step-3

step-2: then I can call verifyFingerprint(...) or verifyFingerprintWithCustomPasswordFallback(...) -> successCB -> goto step-4 -> errorCB -> goto step-5

step-3: user not activated touchid or something happen -> finished. ❌

step-4: then all was ok -> finished ✅

step-5: if verifyFingerprint, then show error -> finished. ❌

Questions: 1) if verifyFingerprintWithCustomPasswordFallback in step-5 has error and error code eq -2, then should I call verifyFingerprintWithCustomPasswordFallbackAndEnterPasswordLabel now? 2) the main different between verifyFingerprint and verifyFingerprintWithCustomPasswordFallback by showing different labels in touch-dialog?

or I understand incorrect?