# Post User Registration Hook not called after Google OAuth Sign-Up

**URL:** <https://community.auth0.com/t/post-user-registration-hook-not-called-after-google-oauth-sign-up/39138>\
**Category:** Get Help\
**Created:** [March 10, 2020, 6:51pm UTC](https://community.auth0.com/t/post-user-registration-hook-not-called-after-google-oauth-sign-up/39138 "2020-03-10T18:51:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![support7](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/support7/32/19679_2.png) [@support7](https://community.auth0.com/u/support7)\
**Post date:** [March 10, 2020, 6:51pm UTC](https://community.auth0.com/t/post-user-registration-hook-not-called-after-google-oauth-sign-up/39138/1 "2020-03-10T18:51:33Z")

</div>

I have a custom hook that runs successfully when a user signs up using the email, username, and password but it does not run when a user signs up using google-oauth2 connection type. My custom hook basically calls another API and passes some of the user’s sign up data. I set up my client id and client secret with google-oauth2 so I’m not using development keys. Is there something i can configure so that the post registration hook will run whether a user sign up using email/username/password and the Oauth2 sign-up?

---

<div class="post-metadata">

**Author:** ![mathiasconradt](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/mathiasconradt/32/12758_2.png) [@mathiasconradt](https://community.auth0.com/u/mathiasconradt)\
**Post date:** [March 10, 2020, 7:13pm UTC](https://community.auth0.com/t/post-user-registration-hook-not-called-after-google-oauth-sign-up/39138/2 "2020-03-10T19:13:36Z")

</div>

Pre/Post-User-Reg-Hooks are only triggered for database connections, not social connections. You should use a [Rule](https://auth0.com/docs/rules) instead and check if it’s the first login of that user (`context.stats.loginsCount`), then call that other API from within the Rule.

---

<div class="post-metadata">

**Author:** ![support7](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/support7/32/19679_2.png) [@support7](https://community.auth0.com/u/support7)\
**Post date:** [March 11, 2020, 5:54am UTC](https://community.auth0.com/t/post-user-registration-hook-not-called-after-google-oauth-sign-up/39138/3 "2020-03-11T05:54:17Z")

</div>

That worked. Thank you.

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [March 11, 2020, 11:20am UTC](https://community.auth0.com/t/post-user-registration-hook-not-called-after-google-oauth-sign-up/39138/4 "2020-03-11T11:20:31Z")

</div>

Glad you have it working now!

---

<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:** [March 26, 2020, 11:20am UTC](https://community.auth0.com/t/post-user-registration-hook-not-called-after-google-oauth-sign-up/39138/5 "2020-03-26T11:20:35Z")

</div>

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