“Auth/network-request-failed” on my react js project

I’m working on a learning project using react-router-dom and firebase authentication for user sign-in and sign-up. However, I’m encountering a FirebaseError: “Firebase: Error (auth/network-request-failed)” when trying to authenticate users. I’ve checked the code implementation, SDKs, and my network, and they all seem to be in order. Interestingly, I tried authenticating users on a different React js app using the same SDKs, and it worked perfectly there. It’s just not working on the project I’m currently working on.

I’d appreciate any help with this. I can share the code if needed. Also, I’m relatively new to web development, so please bear with me if this turns out to be a basic mistake.

I have attempted to create functions for user creation, user sign-in, and Google sign-in/sign-up, and I have exported them to the respective components while passing the necessary credentials. However, when I press a button to log in, sign up, or use Google login, I encounter an error message that says:

FirebaseError: Firebase: Error (auth/network-request-failed).
    at createErrorInternal (firebase_auth.js?v=8dcadb7d:698:37)
    at _fail (firebase_auth.js?v=8dcadb7d:663:9)
    at _performFetchWithErrorHandling (firebase_auth.js?v=8dcadb7d:1125:5)
    at async _validateOrigin (firebase_auth.js?v=8dcadb7d:6908:33)