Add support for "Use Password..." option. #33
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This series of commits adds support for detecting why TouchID authentication fails, as well as falling back to using
pinentry-mac
if the user selects the "Use Password..." option in the TouchID authentication prompt. If the user cancels the authentication, an empty password will be returned.An important note to mention as part of this:
If
pinentry-mac
saved a passphrase in the keychain and the user chooses to use the "Use Password" fallback,pinentry-mac
will read the passphrase from the keychain. Ifpinentry-mac
was given the "Always allow" option, this means that returns the passphrase without prompting the user for any kind of password—which is a trivial way to bypass authentication entirely.While I would argue that problem is more of a user-configuration problem than a problem with
pinentry-touchid
(since anyone with shell access could just replace thepinentry-program
line ingpg-agent.conf
withpinentry-mac
to achieve the same thing), it's probably something worth mentioning regardless.