Auth0 Home Blog Docs

How to test a RULE when developing on localhost?

tests
testing
development
test
rule

#1

Hi :slight_smile:

I’m trying to test my first rule - which is to create a user in my database when the Auth0 db doesn’t have a value. e.g. Custom webhook with ASPNET WebApi2

Part of this rule is this…

request.post({
    url: 'https://yourwebsite.com/auth0',

So … how do we test this out if this endpoint/api is on localhost ?


#2

Because the Rule will be executed on a server, it will not be able to resolve calls to a localhost. You will need to make your API available on the internet for the Rule to be able to call it.


#3

Rules are running on Auth0’s servers, who do not know about your localhost, but can access the internet.

You can make your localhost API available on the internet using a tunneling reverse proxy such as ngrok or pagekite.


#4