Change Password hook not working

I was trying to write a hook, which gets triggered on change password event. When I try to test it, I am getting “Network error”. Is there a way I can test the url connectivity from Auth0.

My application callback to my system works fine. But for some reason, the hook does not.

module.exports = function (user, context, cb) {

console.log(‘Will make the request’);
const request = require(‘ajax-request’);
const sendgridApiKey = context.webtask.secrets.SENDGRID_API_KEY;
request({
url: ‘’,
method: ‘POST’,
headers: {‘Authorization’: 'Bearer ’ + sendgridApiKey},
data: {
query1: ‘value1’
}
}, function(err, res, body) {
console.log(“Finished execution”);
return cb(null);
});
};

Hey @asha.g.pillai, Welcome to the Auth0 Community!

Have you whitelisted the Auth0 Ip address, if you are behind a firewall?

Do this link below:

Regards,
Sid

1 Like

I did add those IPs to my IP table. But still no success. And I am not able to see any valid logs too. It just says “Network error”.

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