File tree 1 file changed +13
-12
lines changed
1 file changed +13
-12
lines changed Original file line number Diff line number Diff line change @@ -24,8 +24,7 @@ tns plugin add nativescript-fingerprint-auth
24
24
## Demo
25
25
If you want a quickstart, [ check out the demo app] ( https://github.com/EddyVerbruggen/nativescript-fingerprint-auth/tree/master/demo ) .
26
26
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 " />
29
28
30
29
## API
31
30
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.
112
111
``` js
113
112
fingerprintAuth .available ().then (
114
113
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 ;
125
116
}
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
+ );
126
127
}
127
128
)
128
129
```
You can’t perform that action at this time.
0 commit comments