Skip to content

Commit 80dd8e7

Browse files
committed
Improve TouchID docs
1 parent cce7854 commit 80dd8e7

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

public/img/docs/touchid.png

56 KB
Loading

resources/views/docs/1/the-basics/system.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,28 @@ about whether something is Linux-, Mac-, or Windows-only.
2020

2121
## TouchID
2222

23-
For Mac systems that support TouchID, you can use TouchID to protect and unlock various parts of your application:
23+
For Mac systems that support TouchID, you can use TouchID to protect and unlock various parts of your application.
2424

2525
```php
2626
use Native\Laravel\Facades\System;
2727

28-
if (System::canPromptTouchID() && System::promptTouchID()) {
29-
// Do you super secret activity here
28+
if (System::canPromptTouchID() && System::promptTouchID('access your Contacts')) {
29+
// Do your super secret activity here
3030
}
3131
```
3232

33+
You must pass a `string $reason` as the only argument to `System::promptTouchID`. This will show up in the dialog that
34+
TouchID users are familiar with:
35+
36+
![TouchID Prompt Example on macOS](/img/docs/touchid.png)
37+
38+
Using this, you can gate certain parts of your app, or your *entire* application, allowing you to offer an extra layer
39+
of protection for your user's data.
40+
41+
**Note: Despite the name, TouchID only gives you greater *confidence* that the person using your app is the same as the
42+
person who has unlocked the device your app is installed on. It does not allow you to *identify* that user, nor does
43+
it give you any special privileges to their system.**
44+
3345
## Printing
3446

3547
You can list all available printers:

0 commit comments

Comments
 (0)