0
votes

I've set up a tunnel using ngrok. I did so mainly to be able to get callbacks from services our server integrates with via Webhooks, while running on local machine during development and testing.

I reserved a domain, example:

123.ngrok.io

When I run my server locally, the tunnel is setup and I can hit it via browser going to 123.ngrok.io, but, when I do so, the browser asks me to authenticate:

enter image description here

My question is this:

Will the service calling the Webhooks to 123.ngrok.io be required to authenticate? If so, I have no idea how to make that work.

Ultimately I need the Webhooks to run like they do when hitting live, no auth needed.

Is ngrok going to block the Webhooks calls from various services due to authentication?

UPDATE:

I have tested the Webhooks hitting my reserved ngrok domain, example, 123.ngrok.io. The service that hits that Webhook at that domain is triggered but returns 401 Unauthorized.

It seems like ngrok is not letting the Webhook through. How do I fix this?

1

1 Answers

0
votes

So I eventually got rid of the 401 error when services were trying to hit the reserved domain by commenting out the auth line in the connect call on ngrok:

const result = await ngrok.connect({
            proto: 'http',
            addr: PORT,
            // auth: `${process.env.NGROK_USER}:${process.env.NGROK_PSW}`,
            subdomain: '123' // reserved tunnel name 123.ngrok.io
        })

This fixed my problem.