Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additions for more versatile use. Also includes view with black background now as default. #50

Open
wants to merge 32 commits into
base: master
Choose a base branch
from

Conversation

oskarirauta
Copy link

Nothing that my commits do - was impossible before I made these commits, but now it's just easier...

.optionalEnterPassword is same as .enterPassword but with cancellation
possibility.
 - Possibility to hide touchID button from view.
 - Possibility to dismiss view automatically on too many wrong
attempts. Requires state with possibility to cancel.
Use new features and add new button to test authentication manually.

Also test new callbacks by logging.
Preparing for future changes
Add list of possible callbacks
Correct GitHub repository for Podfile example
Update Podfile example
Include dark version of view
@oskarirauta oskarirauta changed the title Additions for more versatile use Additions for more versatile use. Also includes view with black background now as default. Jun 6, 2017
 - Reset passcode attempts every time view comes up.
 - Let animation display to the end, before dismissing on too many passcode attempts.
Fix a bad idea by reverting to older....
@ziogaschr
Copy link
Collaborator

@oskarirauta can you explain with more details what this PR is for?

@oskarirauta
Copy link
Author

oskarirauta commented Jun 7, 2017 via email

@ziogaschr
Copy link
Collaborator

ziogaschr commented Jun 9, 2017

Nice ideas.

  • more callbacks

Might be nice to also follow @yankodimitrov way and instead of callbacks do the same my posting a notification. What do you think about this?

  • possibility to dismiss a cancellable view automatically after attempts exceed maximum

Can you describe the use case of this? What I think you want from a security perspective is to lock the user out of your App/View. I already see partly your use case, as you can say that this view is cancelable. Although, will it be better UX wise to handle this case in your code and let the user know why she got out of the flow he was trying to reach? So your code will here for a notification and in this case will a) show an alert or something to the user, b) close the Passcode view.

  • bug fix: reset attempts when view comes up

In the App we are using this library, this is not what we want, so might be easier that the App itself handles this case. Although I would like to know your use case, and if it fits better to what most need, then it might be better for this library. :)

  • possibility to use touchid when passcode is requested, but hide button used for that

Which button, the one in the PasscodeViewController? This would mean that once the user puts your App in background mode, and again back in foreground, there will be no way for the user to open TouchID. Of course, you can still open it for him programmatically. Again, what most people need from this library.


Thanks for your contribution @oskarirauta and for putting the above on discussion from all of us. It's all about setting this library defaults, as the each implementor can switch them in their App implementation, so let's discuss altogether what the library defaults we want to be.

@oskarirauta
Copy link
Author

oskarirauta commented Jun 9, 2017 via email

@ziogaschr
Copy link
Collaborator

ziogaschr commented Jun 10, 2017

more callbacks

I see your point to this one.

possibility to dismiss a cancellable view automatically after attempts exceed maximum

So, it is indeed good to offer this easily to implementors. DOes it makes sense to change this line case .enterOptionalPasscode: return EnterOptionalPasscodeState() to case .enterOptionalPasscode: return EnterPasscodeState(allowCancellation: true)?

Then you can remove the whole EnterOptionalPasscodeState implementation.
I wasn't able to check the diff in my work laptop, so I am checking the files in GitHub only, let me know if more changes are made.

bug fix: reset attempts when view comes up

I still can't see how this is a problem in any case. I will try to run some tests in XCode in order I see it in action.

possibility to use touchid when passcode is requested, but hide button used for that

Fair enough, do you think that hideTouchIDButton makes more sense as the option name instead of shouldDisableTouchIDButton?


Thanks a lot @oskarirauta and I think some from ideas above make sense.

I will try to test them and will come back with feedback if needed.

@yankodimitrov & @velikanov are you willing to give back your feedback, as you know the lib better than me :)

@oskarirauta
Copy link
Author

oskarirauta commented Jun 11, 2017 via email

@ziogaschr
Copy link
Collaborator

Hi @oskarirauta.
This PR becomes very big, making it harder to review and merge it. I will try to check it again, but it will be helpful if you separate your future work in smaller, more pointed PRs. :)

p.s.: it's really cool, that you are willing to contribute to this library 👍

@oskarirauta
Copy link
Author

oskarirauta commented Jul 11, 2017 via email

@ziogaschr
Copy link
Collaborator

I can't find your email, in order I send my ID in a private channel. Can you try to email me?

@oskarirauta
Copy link
Author

oskarirauta commented Jul 11, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants