Firebase踢出当前用户 [英] Firebase kicks out current user

查看:125
本文介绍了Firebase踢出当前用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我有这个问题,每当我添加一个新的用户帐户,它踢出已经登录的当前用户。我读了firebase API,它说:如果新帐户创建,用户自动登录但他们从来没有说任何其他的有关避免这一点。
$ 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆