In react native app (through Expo) using firestore permissions - request.auth is always null

前端 未结 7 1855
天命终不由人
天命终不由人 2020-12-31 09:51

Here\'s my code:

firebase.auth().onAuthStateChanged((user) => {
    if (user) {
        console.log(\"We are authenticated now!\");
        firebase.fires         


        
7条回答
  •  独厮守ぢ
    2020-12-31 10:33

    I downgraded to Firebase SDK 4.6.2 when I had this problem with latest Firebase JS SDK on Expo.

    Also, you have to do this in order for everything to work:

    Copy https://gist.githubusercontent.com/mikelehen/444950a35019208f3aaf18d37ab4937c/raw/85ac4cb3108d92163cb8f04fbffffdcc88d4081aab/index.js

    over your node_modules/@firebase/webchannel-wrapper/dist/index.js

    Without this, you'll get nothing from your collections.

    Hope this helps.

提交回复
热议问题