Hello everyone,
I’ve started my app using the prototyping and add some of Firebase’s products like Firestore, Authentication, Hosting, Apphosting, and Analytics. That worked fine but I saw that it adds the firebase config object directly to my code and through the preview I got auth/popup-closed-by-user (which later I understand that it’s a common issue). so I’ve removed the config from my code and use .env file for that. Then I’ve understand that there are 2 env variable that automatically configured - FIREBASE_WEBAPP_CONFIG and FIREBASE_CONFIG. so I’ve created another env variable when working locally to conditionally pass the firebaseConfig to the initializeApp. This way I was able to work on my project even completely locally (on my local machine without firebase studio).
Something went wrong with the workspace in the process, and after a lot of try and error I’ve run firebase emulators:start in the terminal on firebase studio and now nothing works. It seems that the port that I’ve tried to use was already in use and I couldn’t stopped them because I’m working on the Firebase Studio (which probably don’t have the right permissions). when I’m trying to login with google even on the preview window I’m being redirected to the http://127.0.0.1:9099/emulator/auth/.. which is not working - refuse to connect.
I’ve tried to restart the workspace, clone to another workspace and even created a new firebase project (but when cloning existing repo I can’t use the prototyping feature).
Is there any example of using Firebase Authentication with React & Next with SSR? should I add the firebase config to my source code? can I reset the firebase studio completely?
btw, I can’t see the auth & firebase sections under the publish drawer (but I see it in my other projects).