How to develop an Auth0 rule locally with (works with ngrok)

Hi everyone.

I am trying to develop a rule in Auth0, that will ping our API. While developing this, it would be great if I could expose my local server (then I don’t have to deploy my code to test it). To do this I use

Testing this out with Postman works great, serveo redirects to my local server.

However when trying this from Auth0 with a rule like this:

const axios = require('axios@0.19.2');
const axiosSettings = {
        method: 'post',
        url: '<serveo-url>',
        data: {email:},
        headers: {'content-type': 'application/json'},
        timeout: 15000
.then(res => callback(null, user, context))
.catch(err => callback(null, user, context));

I get the following error:

ERROR: Max redirects exceeded.

When checking the Serveo logs, I can see that many requests are forwarded.

Can you help me out here :raising_hand_man: ?


Tried using ngrok as an alternative to serveo, and it worked with no issues :fire:!

1 Like

Thanks for providing a solution! Marking this solved in OP.

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.