Firebase auth.js超出了最大调用堆栈大小

时间:2016-11-27 03:54:24

标签: javascript reactjs firebase firebase-authentication

我有一个叫firebase.createUserWithEmailAndPassword的小型reactjs应用程序。呼叫无问题,我的新用户帐户已创建。但随后应用程序会立即死于firebase文件auth.js的异常,如上所示。奇怪的是当时和捕获两者都运行。

static register(userId, password, fullName){
    return fbAuth.createUserWithEmailAndPassword(userId, password);
}

static register(userId, password, userName){
return (dispatch) => {
  return AuthApi
    .register(userId, password, userName)
    .then((response, reject) => {
      debugger;
      const thisUserRef = fbDbUser.push({
        fullName: userName,
        userId: userId
      });

      dispatch({type: AuthActions.GOT_USER_SUCCESS, payload: thisUserRef});
    })
    .catch(error => {
      debugger;
      let registerErrorCode = error.code;
      let registerErrorMsg = error.message;

      toastr.error(registerErrorMsg);
      dispatch({type: AuthActions.GOT_USER_FAIL, payload: null});
    });
  };
}

0 个答案:

没有答案