hel*_*ght 32 javascript firebase firebase-authentication
根据文档,我强制用户注销该方法signOut().
这是我尝试过的:
var rootRef = firebase.database().ref();
var loggedInUser = firebase.auth();
1. firebase.signOut();
2. loggedInUser.signOut();
3. rootRef.signOut();
4. signOut();
5. firebase.auth.signOut();
Run Code Online (Sandbox Code Playgroud)
我得到... is not a function了上述五个中的每一个.我知道我对新Firebase的引用没有问题,因为firebase.database().ref();并firebase.auth();没有抛出错误.我还在控制台中迁移了应用程序.
Fra*_*len 81
在JavaScript中,您可以使用以下命令退出用户:
firebase.auth().signOut().then(function() {
console.log('Signed Out');
}, function(error) {
console.error('Sign Out Error', error);
});
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
37531 次 |
| 最近记录: |