Skip to content

Commit bb5ce84

Browse files
doc++
1 parent 919ee6d commit bb5ce84

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

README.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ tns plugin add nativescript-fingerprint-auth
2424
## Demo
2525
If you want a quickstart, [check out the demo app](https://github.com/EddyVerbruggen/nativescript-fingerprint-auth/tree/master/demo).
2626

27-
<img src="https://raw.githubusercontent.com/EddyVerbruggen/nativescript-fingerprint-auth/master/media/ios-demo-01.png" width="200px" /> <img src="https://raw.githubusercontent.com/EddyVerbruggen/nativescript-fingerprint-auth/master/media/ios-demo-02.png" width="200px" /> <img src="https://raw.githubusercontent.com/EddyVerbruggen/nativescript-fingerprint-auth/master/media/ios-demo-03.png" width="200px" />
28-
<img src="https://raw.githubusercontent.com/EddyVerbruggen/nativescript-fingerprint-auth/master/media/ios-demo-04.png" width="200px" /> <img src="https://raw.githubusercontent.com/EddyVerbruggen/nativescript-fingerprint-auth/master/media/ios-demo-05.png" width="200px" />
27+
<img src="https://raw.githubusercontent.com/EddyVerbruggen/nativescript-fingerprint-auth/master/media/ios-demo-01.png" width="200px" /> <img src="https://raw.githubusercontent.com/EddyVerbruggen/nativescript-fingerprint-auth/master/media/ios-demo-02.png" width="200px" /> <img src="https://raw.githubusercontent.com/EddyVerbruggen/nativescript-fingerprint-auth/master/media/ios-demo-03.png" width="200px" /> <img src="https://raw.githubusercontent.com/EddyVerbruggen/nativescript-fingerprint-auth/master/media/ios-demo-04.png" width="200px" /> <img src="https://raw.githubusercontent.com/EddyVerbruggen/nativescript-fingerprint-auth/master/media/ios-demo-05.png" width="200px" />
2928

3029
## API
3130
Want a nicer guide than these raw code samples? Read [Nic Raboy's blog post about this plugin](https://www.thepolyglotdeveloper.com/2016/03/add-touch-id-authentication-support-to-your-nativescript-app/).
@@ -112,17 +111,19 @@ before accepting valid fingerprints again.
112111
```js
113112
fingerprintAuth.available().then(
114113
function(avail) {
115-
if (avail) {
116-
fingerprintAuth.didFingerprintDatabaseChange().then(
117-
function(changed) {
118-
if (changed) {
119-
// re-auth the user by asking for his credentials before allowing a fingerprint scan again
120-
} else {
121-
// call the fingerprint scanner
122-
}
123-
}
124-
);
114+
if (!avail) {
115+
return;
125116
}
117+
118+
fingerprintAuth.didFingerprintDatabaseChange().then(
119+
function(changed) {
120+
if (changed) {
121+
// re-auth the user by asking for his credentials before allowing a fingerprint scan again
122+
} else {
123+
// call the fingerprint scanner
124+
}
125+
}
126+
);
126127
}
127128
)
128129
```

0 commit comments

Comments
 (0)