feat: add Touch ID authentication support for macOS (#16707)
This PR adds Touch ID authentication support for macOS with two new `SystemPreferences` methods. 1. `systemPreferences.promptForTouchID()` returns a Promise that resolves with `true` if successful and rejects with an error message if authentication could not be completed. 2. `systemPreferences.isTouchIDAvailable()` returns a Boolean that's `true` if this device is a Mac running a supported OS that has the necessary hardware for Touch ID and `false` otherwise.
This commit is contained in:
parent
228805353f
commit
46a24c82ff
6 changed files with 121 additions and 0 deletions
|
@ -95,6 +95,10 @@ class SystemPreferences : public mate::EventEmitter<SystemPreferences>
|
|||
|
||||
std::string GetSystemColor(const std::string& color, mate::Arguments* args);
|
||||
|
||||
bool CanPromptTouchID();
|
||||
v8::Local<v8::Promise> PromptTouchID(v8::Isolate* isolate,
|
||||
const std::string& reason);
|
||||
|
||||
static bool IsTrustedAccessibilityClient(bool prompt);
|
||||
|
||||
// TODO(codebytere): Write tests for these methods once we
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue