I'm currently using authorization services in a factored app(user mode app + privileged helper tool). When performing a privilged operation, the user is prompted for their password. How can I also allow authentication through touch ID?
Additional info:
Device: MacBook Pro (15-inch, 2017)
macOS version: 10.13.4 (17E202)
The code is adapted from the EvenBetterAuthorizationSample, so nothing fancy going on there.
I also dug around a bit through /usr/libexec/authopen which does allow the user to choose between TouchID and password. If use codesign to change it's signature, only the password prompt is shown. Am I correct to assume that this feature is currently available only for Apple signed applications/binaries?
As an alternative, I also fiddled around with LocalAuthentication which works great for a standalone app, but does it provide a way of passing the context between processes, as with AuthorizationMakeExternalForm?
Am I correct to assume that this feature is currently available only for Apple signed applications/binaries?
I had a quick look at this and, as far as I can tell, that does seem to be the case [1]. However, I may be missing something here. If you’d like someone to dig into this in more detail, you should open a DTS tech support incident for it (with the caveat that the final answer may well be “file an enhancement request”).
Share and Enjoy
—
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"
[1] If you look in the Darwin source you’ll see that the authorisation engine sets
AGENT_HINT_CLIENT_FROM_APPLE
and it seems that the SecurityAgent keys off that.