[GH-ISSUE #1911] Firebase CORS issue #612

Closed
opened 2026-03-16 16:21:58 +03:00 by kerem · 6 comments
Owner

Originally created by @DeveloperKamlesh on GitHub (Oct 28, 2021).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/1911

Describe the bug
I have integrated firebase now when i login with gmail I get following error in console
Access to fetch at 'https://firestore.googleapis.com/google.firestore.v1.Firestore/Write...' from origin 'https://domain-name:3000' has been blocked by CORS policy: The value of the 'Access-Control-Allow-Origin' header in the response must not be the wildcard '*' when the request's credentials mode is 'include'.

To Reproduce
Steps to reproduce the behavior:
to reproduce simply integrate firebase and try performing action live save, login again etc.

Expected behavior
due to this firebase cors issue unable to save collection in firebase.

Screenshots
error (1)

Desktop (please complete the following information):

  • OS: MacOS
  • Browser chrome
  • Version v2.0.0

Additional context
Kindly Guide me if anyone have any idea about this issue
Thank you

Originally created by @DeveloperKamlesh on GitHub (Oct 28, 2021). Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/1911 **Describe the bug** I have integrated firebase now when i login with gmail I get following error in console `Access to fetch at 'https://firestore.googleapis.com/google.firestore.v1.Firestore/Write...' from origin 'https://domain-name:3000' has been blocked by CORS policy: The value of the 'Access-Control-Allow-Origin' header in the response must not be the wildcard '*' when the request's credentials mode is 'include'.` **To Reproduce** Steps to reproduce the behavior: to reproduce simply integrate firebase and try performing action live save, login again etc. **Expected behavior** due to this firebase cors issue unable to save collection in firebase. **Screenshots** ![error (1)](https://user-images.githubusercontent.com/93252941/139224728-b5c2d065-85d7-40bc-832d-d7e4620cd4f8.jpg) **Desktop (please complete the following information):** - OS: MacOS - Browser chrome - Version v2.0.0 **Additional context** Kindly Guide me if anyone have any idea about this issue Thank you
kerem 2026-03-16 16:21:58 +03:00
Author
Owner

@liyasthomas commented on GitHub (Oct 28, 2021):

Hi @DeveloperKamlesh, did you set the correct environment variables in .env?
Here's the sample environment variables required to setup Firebase: https://github.com/hoppscotch/hoppscotch/blob/main/packages/hoppscotch-app/.env.example

<!-- gh-comment-id:953671112 --> @liyasthomas commented on GitHub (Oct 28, 2021): Hi @DeveloperKamlesh, did you set the correct environment variables in `.env`? Here's the sample environment variables required to setup Firebase: https://github.com/hoppscotch/hoppscotch/blob/main/packages/hoppscotch-app/.env.example
Author
Owner

@DeveloperKamlesh commented on GitHub (Oct 28, 2021):

Yes, I have set correct environment variables.
and able to get user signup details too (like User Emails)
just not able to get data in DB for collection due to this CORS issue

<!-- gh-comment-id:953679385 --> @DeveloperKamlesh commented on GitHub (Oct 28, 2021): Yes, I have set correct environment variables. and able to get user signup details too (like User Emails) just not able to get data in DB for collection due to this CORS issue
Author
Owner

@liyasthomas commented on GitHub (Oct 28, 2021):

If you're accessing the Firebase app from https://domain-name:3000, you have to add it to the Google Cloud Platform console > APIs & Services > Credentials > Browser Key.

<!-- gh-comment-id:953697731 --> @liyasthomas commented on GitHub (Oct 28, 2021): If you're accessing the Firebase app from `https://domain-name:3000`, you have to add it to the [Google Cloud Platform console > APIs & Services > Credentials > Browser Key](https://console.cloud.google.com/apis/credentials).
Author
Owner

@DeveloperKamlesh commented on GitHub (Oct 29, 2021):

at this location
Google Cloud Platform console > APIs & Services > Credentials > Browser Key.
I have set no restriction for any domain, so might be no need to add any domain name, Sir!
image

<!-- gh-comment-id:954590440 --> @DeveloperKamlesh commented on GitHub (Oct 29, 2021): at this location [Google Cloud Platform console > APIs & Services > Credentials > Browser Key.](https://console.cloud.google.com/apis/credentials) I have set no restriction for any domain, so might be no need to add any domain name, Sir! ![image](https://user-images.githubusercontent.com/93318022/139410753-9e2057a8-e987-46d4-a0ec-fd600884d6dd.png)
Author
Owner

@liyasthomas commented on GitHub (Oct 29, 2021):

Since this is not an issue with Hoppscotch but rather it relates to Firebase you might want to raise this issue in Firebase JS SDK repository. Hence closing.

<!-- gh-comment-id:954597474 --> @liyasthomas commented on GitHub (Oct 29, 2021): Since this is not an issue with Hoppscotch but rather it relates to Firebase you might want to raise this issue in Firebase JS SDK repository. Hence closing.
Author
Owner

@DeveloperKamlesh commented on GitHub (Oct 29, 2021):

Ok thank you let me check there

<!-- gh-comment-id:954598729 --> @DeveloperKamlesh commented on GitHub (Oct 29, 2021): Ok thank you let me check there
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#612
No description provided.