File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,35 @@ Want a nicer guide than these raw code samples? Read [Nic Raboy's blog post abou
62
62
)
63
63
```
64
64
65
+ ## Security++
66
+ Since iOS9 it's possible to check whether or not the list of enrolled fingerprints changed since
67
+ the last time you checked it. It's recommended you add this check so you can counter hacker attacks
68
+ to your app. See [ this article] ( https://godpraksis.no/2016/03/fingerprint-trojan/ ) for more details.
69
+
70
+ So instead of checking the fingerprint after ` available ` add another check.
71
+ In case ` didFingerprintDatabaseChange ` returns ` true ` you probably want to re-authenticate your user
72
+ before accepting valid fingerprints again.
73
+
74
+ ``` js
75
+ touchid .available ().then (
76
+ function (avail ) {
77
+ if (avail) {
78
+ touchid .didFingerprintDatabaseChange ().then (
79
+ function (changed ) {
80
+ if (changed) {
81
+ // re-auth the user by asking for his credentials before allowing a fingerprint scan again
82
+ } else {
83
+ // call the fingerprint scanner
84
+ }
85
+ }
86
+ );
87
+ }
88
+ }
89
+ )
90
+ ```
91
+
65
92
## Changelog
93
+ - 2.1.0 Added ` didFingerprintDatabaseChange ` for enhanced security.
66
94
- 2.0.0 Added ` verifyFingerprintWithCustomFallback ` , ` verifyFingerprint ` now falls back to the passcode.
67
95
- 1.2.0 You can now use the built-in passcode interface as fallback.
68
96
- 1.1.1 Added TypeScript definitions.
You can’t perform that action at this time.
0 commit comments