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

前端 未结 7 1906
天命终不由人
天命终不由人 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:24

    First check the Stuff on the FIREBSAE Rule Exectuion Simulator,

    and secondly your issue sounds like you'r requests are not in Sync, check your rules (if possible) in the Web view , as i tried doing the same and it worked for me

        {
          "rules": {
                    ".read": "auth != null",
                    ".write": "auth != null"
                   }
        }
    

提交回复
热议问题