The new requirements around using forge tunnel are proving to make local development incredibly difficult. I understand why the change needed to be made to support product requirements of ngrok, but there is no way to configure ngrok now to point to anything other than localhost on a random port or keep a consistent ngrok url. This is particularly important for apps that have oauth configurations or talk to a separate backend locally and need to use specific ngrok url’s or ports.
Previously, for local development, I would run ngrok http app.something.local:8080
which would point the created ngrok url to the specified address locally. I would then update my manifest and deploy to development with the specified ngrok url with blocks like this:
external:
fetch:
backend:
- https://development-env.auth0.com
- "*.ngrok-free.app"
- https://some-generated-url.ngrok-free.app
This let my forge app communicate with a different backend service and reliably go through my oauth flow for signing into a third party app
This configuration can be achieved with an ngrok configuration file under the tunnels
block. ngrok docs
You can then start ngrok with that specific tunnel config using ngrok start tunnel-name
The new forge tunnel functionality prevents all of this. It generates a random tunnel name, random port, and uses localhost with no option override.
This should be configurable either in the manifest or command line for the tunnel command. It is pretty standard ngrok usage to set something up in this manner so I would imagine that other developers will run into similar issues.
The current workaround I am trying is to use the generated tunnel ngrok url and port to redirect requests to the actual local url and port I need it to. I’ve yet to get that to work consistently and feels very brittle. If there is a different workaround to use a specific configuration that would be preferred.