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

feat: add Touch ID authentication support for macOS #16707

Merged
merged 9 commits into from Feb 14, 2019

Conversation

@codebytere
Copy link
Member

commented Feb 3, 2019

Description of Change

Resolves #16699.

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.

Checklist

Release Notes

Notes: Added native Touch ID authentication support for macOS.

@codebytere codebytere requested review from as code owners Feb 3, 2019

@codebytere codebytere changed the title Touch auth feat: add Touch ID authentication support for macOS Feb 3, 2019

@codebytere codebytere force-pushed the touch-auth branch 3 times, most recently from bb3dec9 to 3273849 Feb 4, 2019

@ckerr ckerr added the semver/minor label Feb 12, 2019

Show resolved Hide resolved BUILD.gn Outdated
@@ -93,6 +93,8 @@ void SystemPreferences::BuildPrototype(
.SetMethod("setAppLevelAppearance",
&SystemPreferences::SetAppLevelAppearance)
.SetMethod("getSystemColor", &SystemPreferences::GetSystemColor)
.SetMethod("isTouchIDAvailable", &SystemPreferences::IsTouchIDAvailable)
.SetMethod("promptTouchID", &SystemPreferences::PromptTouchID)

This comment has been minimized.

Copy link
@ckerr

ckerr Feb 12, 2019

Member

Is SystemPreferences the right place for this functionality? It doesn't seem preference-related.

This comment has been minimized.

Copy link
@codebytere

codebytere Feb 12, 2019

Author Member

i thought about this too, but wasn't sure there was any more appropriate place 🤔

On Mac, this is where one would modify and deal with settings for TouchID though, so i think it's best of our available options

Show resolved Hide resolved atom/browser/api/atom_api_system_preferences_mac.mm Outdated
Show resolved Hide resolved atom/browser/api/atom_api_system_preferences_mac.mm Outdated
Show resolved Hide resolved atom/browser/api/atom_api_system_preferences_mac.mm
Show resolved Hide resolved docs/api/system-preferences.md Outdated
Show resolved Hide resolved docs/api/system-preferences.md Outdated
Show resolved Hide resolved docs/api/system-preferences.md
Show resolved Hide resolved docs/api/system-preferences.md Outdated

@codebytere codebytere force-pushed the touch-auth branch from 1d51efc to 679f72a Feb 13, 2019

@codebytere codebytere requested a review from ckerr Feb 13, 2019

codebytere added some commits Feb 3, 2019

@codebytere codebytere force-pushed the touch-auth branch from f4f653c to c6bbe88 Feb 13, 2019

codebytere and others added some commits Feb 13, 2019

minor copyediting on touchID docs
Clarify how `systemPreferences.canPromptTouchID()` and `systemPreferences.promptTouchID()` behave on older versions of macOS.
@ckerr

ckerr approved these changes Feb 13, 2019

Copy link
Member

left a comment

Thanks for all the fixes! LGTM

@codebytere

This comment has been minimized.

Copy link
Member Author

commented Feb 13, 2019

I gotta forward-declare the instance method biometryType and the enum LABiometryType 👇

update: 🍐'd through it

codebytere and others added some commits Feb 13, 2019

@codebytere codebytere merged commit 46a24c8 into master Feb 14, 2019

13 of 16 checks passed

appveyor: win-x64-testing AppVeyor build failed
Details
appveyor: win-ia32-debug Waiting for AppVeyor build to complete
Details
Artifact Comparison Changes Detected
Details
Backportable? - 5-0-x Clean Backport
Details
Semantic Pull Request ready to be squashed
Details
WIP Ready for review
Details
appveyor: win-ia32-testing AppVeyor build succeeded
Details
appveyor: win-ia32-testing-pr AppVeyor build succeeded
Details
appveyor: win-x64-debug AppVeyor build succeeded
Details
appveyor: win-x64-testing-pr AppVeyor build succeeded
Details
build-linux Workflow: build-linux
Details
build-mac Workflow: build-mac
Details
electron-arm-testing Build #20190213.61 succeeded
Details
electron-arm64-testing Build #20190213.60 succeeded
Details
lint Workflow: lint
Details
release-notes Release notes found
@release-clerk

This comment has been minimized.

Copy link

commented Feb 14, 2019

Release Notes Persisted

Added native Touch ID authentication support for macOS.

@trop

This comment has been minimized.

Copy link
Contributor

commented Feb 14, 2019

I have automatically backported this PR to "5-0-x", please check out #16952

@trop trop bot added in-flight/5-0-x and removed target/5-0-x labels Feb 14, 2019

arlenyan added a commit to arlenyan/electron that referenced this pull request Apr 28, 2019

feat: add Touch ID authentication support for macOS (electron#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.

arlenyan added a commit to arlenyan/electron that referenced this pull request Apr 29, 2019

feat: add Touch ID authentication support for macOS (electron#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.

arlenyan added a commit to arlenyan/electron that referenced this pull request Apr 29, 2019

feat: add Touch ID authentication support for macOS (electron#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.

arlenyan added a commit to arlenyan/electron that referenced this pull request Apr 30, 2019

feat: add Touch ID authentication support for macOS (electron#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.

arlenyan added a commit to arlenyan/electron that referenced this pull request Apr 30, 2019

feat: add Touch ID authentication support for macOS (electron#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.

arlenyan added a commit to arlenyan/electron that referenced this pull request May 30, 2019

feat: add Touch ID authentication support for macOS (electron#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.
@alchaplinsky

This comment has been minimized.

Copy link

commented Jun 27, 2019

Was this eventually removed from 5.0x? It doesn't look like systemPreferences module has these methods anymore. And they are also missing in the documentation

@codebytere

This comment has been minimized.

Copy link
Member Author

commented Jun 27, 2019

@alchaplinsky this was never backported to 5; it's only present in 6 onward. Online documentation reflects the latest stable version (5-0-x) so that's why it's not present there either.

@alchaplinsky

This comment has been minimized.

Copy link

commented Jun 28, 2019

@codebytere Ok, got it. Thank you for response. Will try out v6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.