首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >反应本机和火基3

反应本机和火基3
EN

Stack Overflow用户
提问于 2016-05-28 07:55:30
回答 4查看 3K关注 0票数 2

我正在尝试集成本地和Firebase 3身份验证。我的密码。

代码语言:javascript
复制
import { FIREBASE_CONFIG } from '../config';
import firebase from 'firebase/app';
import firebaseDatabase from 'firebase/database';
import firebaseAuth from 'firebase/auth';

firebase.initializeApp(FIREBASE_CONFIG);

export const rootRef = firebase.database();
export const authRef = firebase.auth();

配置

代码语言:javascript
复制
module.exports = {
  FIREBASE_CONFIG: {
    apiKey: "long string from firebase",
    authDomain: "xxxxx.firebaseapp.com",
    databaseURL: "https://xxxxx.firebaseio.com",
    storageBucket: "xxxxx.appspot.com"
  }
}

但是..。

我遗漏了什么吗?如果我是,你能指出正确的方向配置吗?

  • Native0.26.2
  • 火力基地3.0.2
EN

回答 4

Stack Overflow用户

回答已采纳

发布于 2016-06-29 15:12:38

firebase JavascriptSDK3.1.0的新版本反应了本机兼容性。

https://firebase.google.com/support/release-notes/js#3.1.0

票数 1
EN

Stack Overflow用户

发布于 2016-06-01 07:54:56

新的火力基地不支持反应-本土化。如果您想在react本机中使用firebase,则使用firebase版本2.4.2。在第3版中,不能使用firebase,但realTimeDatabase可以在firebase3中使用。如果您想使用firebase3 auth,我建议使用web视图,反应-本机登录,但我认为这是不好的。

票数 2
EN

Stack Overflow用户

发布于 2016-07-01 01:00:11

要使用Firebase JS 3.1+,您可能必须导入整个包:

代码语言:javascript
复制
import firebase from 'firebase'

而不仅仅是firebase/app等,否则您可能会得到以下错误:

未找到React本机兼容性库。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/37496639

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档