# Change Password hook not working

**URL:** <https://community.auth0.com/t/change-password-hook-not-working/52370>\
**Category:** Get Help\
**Tags:** auth0\
**Created:** [October 28, 2020, 8:25pm UTC](https://community.auth0.com/t/change-password-hook-not-working/52370 "2020-10-28T20:25:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![asha.g.pillai](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/asha.g.pillai/32/25270_2.png) [@asha.g.pillai](https://community.auth0.com/u/asha.g.pillai)\
**Post date:** [October 28, 2020, 8:25pm UTC](https://community.auth0.com/t/change-password-hook-not-working/52370/1 "2020-10-28T20:25:16Z")

</div>

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);  
});  
};

---

<div class="post-metadata">

**Author:** ![sidharth.chaudhary](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/sidharth.chaudhary/32/20686_2.png) [@sidharth.chaudhary](https://community.auth0.com/u/sidharth.chaudhary)\
**Post date:** [October 29, 2020, 1:24am UTC](https://community.auth0.com/t/change-password-hook-not-working/52370/2 "2020-10-29T01:24:05Z")

</div>

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:

> **[Auth0 IP Addresses for Allow Lists](https://auth0.com/docs/secure/security-guidance/data-security/allowlist)**
>
> Lists Auth0 IP addresses for use in allow lists for inbound traffic behind a firewall.

Regards,  
Sid

---

<div class="post-metadata">

**Author:** ![asha.g.pillai](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/asha.g.pillai/32/25270_2.png) [@asha.g.pillai](https://community.auth0.com/u/asha.g.pillai)\
**Post date:** [October 29, 2020, 4:54pm UTC](https://community.auth0.com/t/change-password-hook-not-working/52370/3 "2020-10-29T16:54:58Z")

</div>

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”.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [November 13, 2020, 4:55pm UTC](https://community.auth0.com/t/change-password-hook-not-working/52370/4 "2020-11-13T16:55:04Z")

</div>

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