allow https for local testing
See original GitHub issueHello, 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:
- Created 4 years ago
- Comments:10 (3 by maintainers)
@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?Using v9
connectFirestoreEmulator
, it is really not possible to use HTTPS sincessl
is set to false.https://github.com/firebase/firebase-js-sdk/blob/1cf124e6ef0c7f921bea018cd638ea17dcfaa991/packages/firestore/src/lite-api/database.ts#L252