firebase - 注销用户时出错 - invertase React Native Firebase
问题描述
我正在尝试从我的应用程序中注销用户,但我从控制台收到此消息。
Possible Unhandled Promise Rejection (id: 1):
TypeError: undefined is not an object (evaluating '_auth.firebase.auth.currentUser.signOut')
以下文档(https://invertase.io/oss/react-native-firebase/v6/auth/reference/module#signOut)我做了一个这样的功能
async function LogoutUser() {
firebase.auth.currentUser.signOut();
}
但用户帐户没有任何反应。请问,谁能帮帮我?
解决方案
signOut
是身份验证的功能。试试下面的代码
firebase.auth().signOut().then(function(){
console.log('Signed Out');
},function(error){
});
推荐阅读
- python - Pandas DataFrame 过滤器
- amazon-web-services - 如何让火花在 S3 上保存它的临时文件?
- java - 在 Fragment 和 MYSQL 数据中使用 RecyclerView
- java - 在没有安装 MS Office 的情况下在 Linux 机器中读取 .xls 文件
- c# - .NET Core 2.1 从类库记录到数据库
- github - Heroku:如何从 GitHub 安装现有应用程序?
- haskell - 我可以逃脱 `catch` 中的 `IO`
- python - 从列表python中删除第一次出现的元素
- javascript - 在 Mac 上的 Excel 上从 VBA 调用 Javascript
- javascript - Json模型不绑定角度