question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

allow https for local testing

See original GitHub issue

Hello, this is a CLI-specific feature request, so I’m submitting it here rather than through the general Firebase channel.

Scenario I’m attempting to test a Stripe integration using the local emulator, but I can’t because Stripe considers the Firebase emulator insecure. (Details at bottom.)

Current workaround is to deploy on every change, but this is slow and makes viewing logs difficult.

Due-diligence Googling reveals that there are ways of serving localhost over https – which I am also attempting – but I thought it was worth noting here, because one of the reasons I turned to Firebase was the ease of onboarding, and all-in-one workflow. Other users like me (less experienced with backend or devops) may benefit from having this built in.

Feature request: serve by default over https, or at least allow it with a flag.

For reference / reproducibility see https://github.com/stripe-samples/checkout-single-subscription/tree/master/client-only/client
specifically, in index.html, change the successUrl near the bottom to localhost:5000 for use with the Firebase emulator. Then go through the Checkout process successfully, and you’ll get the SSL: not secure error on redirect back to localhost.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
samtsterncommented, Jan 9, 2020

@ultraGentle thanks for the feedback! We’ve investigated a few ways of serving https on Localhost but it’s basically not possible to do cross-platform through an unprivileged Node.js process.

Have you looked into using something like ngrok or another local proxy to create an HTTPS tunnel to your emulator?

0reactions
github0013commented, Apr 14, 2022

Using v9 connectFirestoreEmulator, it is really not possible to use HTTPS since ssl is set to false.

https://github.com/firebase/firebase-js-sdk/blob/1cf124e6ef0c7f921bea018cd638ea17dcfaa991/packages/firestore/src/lite-api/database.ts#L252

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to use HTTPS for local development - web.dev
If you open your locally running site in your browser using HTTPS, your browser will check the certificate of your local development server....
Read more >
How to Get SSL HTTPS for Localhost - Section.io
Step 1: Generate a CA certificate · Step 2: Generating a certificate · Step 3: Creating a Node.js Express server · Step 4:...
Read more >
Using HTTPS in Your Development Environment - Auth0
Without going into details, to enable HTTPS, a web server needs a private key and a public key to set up encrypted communication...
Read more >
How to get HTTPS working on your local development ...
Open Keychain Access on your Mac and go to the Certificates category in your System keychain. Once there, import the rootCA.pem using File...
Read more >
How to test HTTPS Websites from Local Host | BrowserStack
Providing SSL Certificates to Test HTTPS Website · Step 1: Rooting SSL Certificate · Step 2: Trusting the Rooted SSL Certificate · Step...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found