Answer the question
In order to leave comments, you need to log in
How to connect to firebase?
When developing an application in React, there was such a problem. I have a Firebase Remote Database that I need to upload data from. There is a similar android app that works correctly without errors, but the react app can't connect to firebase.
I will say right away that my access rights to the database are configured as follows:
{
"rules": {
".read": "auth != null",
".write": "auth != null"
}
}
import firebase from 'firebase';
const config = {
apiKey: "***",
authDomain: "***",
databaseURL: "***",
projectId: "***",
storageBucket: "***",
messagingSenderId: "***"
};
firebase.initializeApp(config);
export const database = firebase.database();
export const auth = firebase.auth();
Answer the question
In order to leave comments, you need to log in
{
"rules": {
".read": "auth != null",
".write": "auth != null"
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question