Auth/network-request-failed

141 views
Skip to first unread message

Param Patel

unread,
Jun 26, 2024, 2:14:46 PMJun 26
to Firebase Google Group
Hey there, 
I'm currently learning react-router-dom and working on a project that involves using firebase authentication for user login and signup. However, I'm facing an error: FirebaseError: Firebase: Error (auth/network-request-failed) whenever I try to sign in or sign up users. I've tested the SDKs on a separate reactjs app and they work fine there. I'm not sure what's causing the issue in my main project.
Is there anyone who encountered the same error ? 
Can someone please help me with this ? 

Btw, I am still learning web dev, I am a high school student. So, if this is a rookie error then please assist me.

Dax Patel

unread,
Jun 26, 2024, 11:53:20 PMJun 26
to fireba...@googlegroups.com

Hi Pram,

I'm glad to help with the "FirebaseError: Firebase: Error (auth/network-request-failed)" you're encountering in your React project. There's a good chance it might be related to the way you're implementing sign-in.

Here's what's going on: Starting June 24, 2024, there are some changes in how firebase handle sign-in redirects. This could be affecting your app if you're using signInWithRedirect from the Firebase Web SDK.

The good news is there are solutions! We've put together a guide with best practices for using signInWithRedirect that ensures compatibility with the latest browser updates. This will help your users continue signing in seamlessly, even on platforms like Google Chrome M115+, Firefox 109+, and Safari 16.1+.

Here's what you can do:

  1. Check the Best Practices Guide: https://firebase.google.com/docs/auth/web/redirect-best-practices
  2. Follow the steps outlined in the guide to implement the recommended approach for redirect sign-in.

This should resolve the error you're seeing. If you have any further questions or need more specific help after following the guide, feel free to reply to this email, and we'll be happy to assist further!

By the way, it's great that you're learning React and Firebase – keep at it! Don't hesitate to ask if you encounter any other rookie errors along the way. We all start somewhere.

Best regards, 

Dax Patel.


--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/fc37cc88-e045-43f4-82a5-5fea8163d690n%40googlegroups.com.

Param Patel

unread,
Jun 27, 2024, 9:57:15 AMJun 27
to Firebase Google Group
Hey Dax,

I just wanted to say a big thank you for all your help. I know there are some changes coming after June 24th, but I've been dealing with this issue since June 11th. I've been using the 'signInWithPopup' method for signing in, and I've double-checked everything by testing it on a different react app. It worked perfectly there, so it seems like there might be an issue with my app. If you want, I can share the repo link so you can take a look.

Thanks so much for your help!

Dax Patel

unread,
Jun 27, 2024, 7:04:37 PMJun 27
to fireba...@googlegroups.com
Hey Param, Yeah sure you can share it with me. I will be glad if I can resolve your problem.

Param Patel

unread,
Jul 7, 2024, 7:44:57 PM (9 days ago) Jul 7
to Firebase Google Group
Hey Dax, 
Just to let you know, I have already emailed you the repo link, you have a look if you want. But I have resolved the issue, it was the mirage server which was there for a temporary period of time, which was causing issues, as soon as I disabled the initialization of the mirage server js file, all the firebase services continued to work. Anyways, appreciate your effort to help me. Keep doing what you are doing. Happy coding.
Thank you once again.

Reply all
Reply to author
Forward
0 new messages