Firebase踢出当前用户 [英] Firebase kicks out current user
问题描述
$ b $
//添加雇员
addEmployees:function(formData){
firebase.auth()。createUserWithEmailAndPassword (formData.email,formData.password).then(function(data){
console.log(data);
});
},
我是管理员,我正在向我的网站添加帐户。我想如果我可以添加一个帐户,而不登出并签署到新帐户。任何方式,我可以避免这一点?
更新20161108 - 原始答案下面
Firebase刚刚发布了其firebase-admin SDK,它允许服务器端代码用于这个和其他常见的管理用例。阅读安装说明,然后深入关于创建用户的文档。
原始答案
目前这是不可能的。创建一个电子邮件+密码用户自动签署新用户。
So I have this issue where every time I add a new user account, it kicks out the current user that is already signed in. I read the firebase api and it said that "If the new account was created, the user is signed in automatically" But they never said anything else about avoiding that.
//ADD EMPLOYEES
addEmployees: function(formData){
firebase.auth().createUserWithEmailAndPassword(formData.email, formData.password).then(function(data){
console.log(data);
});
},
I'm the admin and I'm adding accounts into my site. I would like it if I can add an account without being signed out and signed into the new account. Any way i can avoid this?
Update 20161108 - original answer below
Firebase just released its firebase-admin SDK, which allows server-side code for this and other common administrative use-cases. Read the installation instructions and then dive into the documentation on creating users.
original answer
This is currently not possible. Creating an Email+Password user automatically signs that new user in.
这篇关于Firebase踢出当前用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!