Firebase Auth js 400 bad request - reactjs

I have created an web app using React Js and using firebase as database. It's working fine somtime and sometime it throws following error and takes too much time to load the data.
POST https://securetoken.googleapis.com/v1/token?key=AIzaSyDiQyIT5cn5_zyA4777R888g4wgmKeFZOw-dA 400
I am not able to figure out why it's working some time and does not work sometime. I have attached the console error's screen shot.
Even after getting this error I am able to retrive the data and write the data in firebase but it takes too much time to perform the operation.
I would really appriciate if someone could provide solution.
Thanks in advance.

Related

"firebase_compat_app__WEBPACK_IMPORTED_MODULE_0__.default.storage is not a function". I GOT THIS WEIRD ERROR BY FIREBASE

**I am actually working on snapchat clone but i am not able to use firebase storage it shows some weird bug. I am attaching snapshots. **
I am working with React and firebase(for backend).
I got this error in console
I am attaching code snippets.
Here I import firebase storage and other
These are the rules of storage
These are the packages
I got stuck with this for 2 days now but everytime it shows this error. Please help i am new to the develpement.
I did a lot of research regarding the same problem. I watched tons of tutorials and read articles but nothing could help me.

How to post data to wordpress database using react

i'm trying to create a wordpress plugin and got a bit lost.
I'm not looking for a solution in code but could anyone direct me to a tutorial/docs where to find the correct approach.
I'm trying to post an array of objects to a mysql database.
Most basic stuff that you can do - onClick function, that connects to a database.
My wordpress plugin is created using React and I have previously used AJAX, but this time it throws quite a lot of errors that I have not seen, so I don't even know where to begin.
mysql npm package is also not working as I have used it before so i'm just confused.
Essentially could anyone tell me which API to use and link a good tutorial

React Table Takes time to load from api

I am new to react and I am currently working on a material-ui dashboard where they had dummy data inside a json file which they used to populate a Table. I changed the dummy data and started calling the data from a mock api using axios. Everything works fine except the table takes about 5 seconds to load the data after each page load. Is there a way we can speed this up? I have experience working in php with bootstrap dashboards but I never encountered such an issue there. Any advice is appreciated. Thankyou.
The issue was that the key I gave was not a unique value. I changed the key value to index of the data and the time was improved significantly.

Firebase verify post dimensions before uploading

I have a Cropper component on my client side (React Native app) which lets the user to crop an image before posting it to my Firebase database. But, what about hackers? I think that if someone gets the apk and see the code, maybe will modify my Cropper and rebuild the app, breaking my bussiness rules.
So, what I want to know is if there is a mechanism to check the dimensions of a picture on the backend (firebase) and decide to post the photo or return an error message to the client.
Thank you.
You can save the images through a Cloud Function or Firebase Function and check it there. It is not necessary that the Function is from Firebase.
The image will be uploaded as the body in the http request, then, you load that image and check its size using a frame work https://www.npmjs.com/package/image-size. If the checks are passed, you can store it where it was supposed.

Getting a new data from firebase database real time with angularfire2

im using angularfire2 to connect firebase real time database. and it works well. is it possible to get new items from firebase rtdb using angularfire2??. the docs a lil bit confusing. i tried this code from this site. and i dont know how i code onCreate() or onDelete() in angularfire2. thanks.

Resources