-
Notifications
You must be signed in to change notification settings - Fork 115
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
Better support for operationPrompt
#18
Comments
I've had to do the same in my own implementation i.e. use operationPrompt pre iOS 11.x I don't think you currently have any other choice and although it's not so nice, it is a necessary evil for the moment. |
Yep. Thanks for chiming in. One additional constraint is that we don’t want to query the private key excessively for devices that doesnt support the access control flag «privateKeyUsage». |
Looks like a reasonable solution. I'm not sure if you implied this or not but this enum could also be utilized at the API level? let config = EllipticCurveKeyPair.Config(
...
operationPrompt: EllipticCurveKeyPair.Prompt.string("Message"),
// or EllipticCurveKeyPair.Prompt.context(context)
...) |
Yes, it could. Users could also write the shorter version (omitting let config = EllipticCurveKeyPair.Config(
...
operationPrompt: .string("Message"),
...) since the type is known. I was looking for non-breaking changes, but it seems like a good idea to do a breaking change in order to get this right. |
Continuing the discussion from #17.
I think it is a good idea, but I am still conflicted. I don't want to make the API and code more complicated than it is.
I would love to just use the LAContext under the hood, but sadly the
localizedReason
property was introduced on iOS 11... Thus forcing us to instead sendoperationPrompt
parameter all the way down to the query.Example of what's needed to change.
Current code
The text was updated successfully, but these errors were encountered: