【发布时间】:2017-02-26 16:01:45
【问题描述】:
当您将 Firebase 作为后端并使用 Ionic 2 时,您可以使用 Touch ID 吗? 这是我当前的代码。
platform.ready().then(() => {
touchid.checkSupport(() => {
touchid.authenticate((result) => {
ngZone.run(() => {
this.navCtrl.setRoot(TabsPage);
});
}, (error) => {
alertCtrl.create({
title: "Attention!",
subTitle: error,
buttons: ["Close"]
});
}, "Please Authenticate");
}, (error) => {
alertCtrl.create({
title: "Attention!",
subTitle: "Touch ID is not supported",
buttons: ["Close"]
});
});
});
【问题讨论】:
-
Touch Id 功能与后端无关。您可以与 Ionic 2 一起使用。