You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using this pinCode component purely for the neat buttons, theme-able interface and relative feature-completeness.
I have questions that I've tried to answer myself through searching the Issues / the web but cannot find an answer.
It's not clear what format the pin can be stored in, unless the implication is that it can only be a 4 character string pin.
This has consequences for me, means that I cannot use the Keychain functionality at all because the Pin I get to start with is hashed at least twice already.
This complicates the usage of this component to a great degree.
What's the difference between endProcessFunction & finishProcess?
They seem to get called depending on which one is overwritten, and depending on whether the pin was input correctly or not, very strange.
I'm struggling with doing a State update to hide the pin component while an expensive comparison function runs, but React state updates are deferred until after all the Pincode callbacks complete, making it seemingly impossible to swap in a Loader.
I'm currently stuck between a hard-locked UI thread, a Possible Unhandled Promise rejection and Async Redux state setting loading:true after the Pin Screen is closed instead of at the start of finishProcess or endProcessFunction
handleResultEnterPin
Function to be used to handle the PIN code entered by the user. To be used with the pinStatus props
3a. What does To be used mean here? Does the function have to return pinStatus or update a parent component and bubble a prop down to the pinCode with the correct new status?
3b. I'm not using handleResultEnterPin because state of the component is too hard to control, so I'm using
storePin={this.storePinFunction} // fires onPinScreenCompletion only for 'choose'
(saves Pin and closes pinscreen modal)
finishProcess={this.onPinScreenCompletion} // only for 'enter'
(hashcompare's pin + closes modal if it's a match)
Is there a better way to manage this?
documented Functions that say any as input make for a confusing experience.
really needs more clarity on the function / flow for using the component for an external pin setup - with no Keychain + external pin provider.
Stored pin, does it only support a 4 character string?
Proposal for 3.00
Instead of all these odd function parameters, just:
comparisonFunction(pin):Promise
pinEntered(pin):Promise
I might be missing something obvious but the helpers for pinIsSet / currentPin aren't useful if using something other than a plain text pin.
I will have to update and very carefully test & re-implement usage of the Pin Component.
So this is on the back-log for me.
Most of the questions above still stand.
Notably, question 1, 3 and 5 have been answered by the Pull request mentioned.
Pin must be un-encrypted 4 character string pin. handleResultEnterPin can now be overridden to suit the use case of an encrypted pin being passed to the Application from an api request.
Hello,
I'm using this pinCode component purely for the neat buttons, theme-able interface and relative feature-completeness.
I have questions that I've tried to answer myself through searching the Issues / the web but cannot find an answer.
This has consequences for me, means that I cannot use the Keychain functionality at all because the Pin I get to start with is hashed at least twice already.
This complicates the usage of this component to a great degree.
endProcessFunction
&finishProcess
?They seem to get called depending on which one is overwritten, and depending on whether the pin was input correctly or not, very strange.
I'm struggling with doing a State update to hide the pin component while an expensive comparison function runs, but React state updates are deferred until after all the Pincode callbacks complete, making it seemingly impossible to swap in a Loader.
I'm currently stuck between a hard-locked UI thread, a Possible Unhandled Promise rejection and Async Redux state setting loading:true after the Pin Screen is closed instead of at the start of
finishProcess
orendProcessFunction
handleResultEnterPin
3a. What does
To be used
mean here? Does the function have to return pinStatus or update a parent component and bubble a prop down to the pinCode with the correct new status?3b. I'm not using handleResultEnterPin because state of the component is too hard to control, so I'm using
storePin={this.storePinFunction} // fires onPinScreenCompletion only for 'choose'
finishProcess={this.onPinScreenCompletion} // only for 'enter'
Is there a better way to manage this?
documented Functions that say
any
as input make for a confusing experience.really needs more clarity on the function / flow for using the component for an external pin setup - with no Keychain + external pin provider.
Stored pin, does it only support a 4 character string?
Proposal for 3.00
Instead of all these odd function parameters, just:
I might be missing something obvious but the helpers for pinIsSet / currentPin aren't useful if using something other than a plain text pin.
linked / similar issues:
#155
#153
The text was updated successfully, but these errors were encountered: