当您使用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"]
});
});
});
答案 0 :(得分:0)
你想使用带有TouchID的Firebase吗?由于您的代码是身份验证代码示例。但是如果你想肯定,你可以像验证结果为真时那样使用它,你可以调用firebase方法来做某事。
它们不相关,TouchID是一个插件,Firebase是一个数据库即服务。