'Firebase Auth js 400 bad request

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.

enter image description here

Thanks in advance.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source