# Auth0 actions user registration not running on google-auth

**URL:** <https://community.auth0.com/t/auth0-actions-user-registration-not-running-on-google-auth/93238>\
**Category:** Get Help\
**Tags:** google, auth, actions, auth0\
**Created:** [October 27, 2022, 3:26pm UTC](https://community.auth0.com/t/auth0-actions-user-registration-not-running-on-google-auth/93238 "2022-10-27T15:26:07Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![abhijeet](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/abhijeet/32/34674_2.png) [@abhijeet](https://community.auth0.com/u/abhijeet)\
**Post date:** [October 27, 2022, 3:26pm UTC](https://community.auth0.com/t/auth0-actions-user-registration-not-running-on-google-auth/93238/1 "2022-10-27T15:26:07Z")

</div>

So I wrote a custom action to send user email to zapier, triggered on `post user registration` but it only works when signup is done using `username-password` but skips the action run when signup is using google or discord.  
The new user is created in Auth0 but the event is not triggered.

Any way we can run the events in case of google-auth and discord-auth too ?

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [October 27, 2022, 6:27pm UTC](https://community.auth0.com/t/auth0-actions-user-registration-not-running-on-google-auth/93238/3 "2022-10-27T18:27:06Z")

</div>

Hey @abhijeet welcome to the community!

> [@abhijeet](#):
>
> Any way we can run the events in case of google-auth and discord-auth too ?

What you’re experiencing is expected behavior for social/federated users - You’ll need to either use a rule or post-login Action for these users specifically.

Hope this helps!

---

<div class="post-metadata">

**Author:** ![abhijeet](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/abhijeet/32/34674_2.png) [@abhijeet](https://community.auth0.com/u/abhijeet)\
**Post date:** [October 28, 2022, 8:09am UTC](https://community.auth0.com/t/auth0-actions-user-registration-not-running-on-google-auth/93238/4 "2022-10-28T08:09:31Z")

</div>

Hey @ty.frith Thanks for the suggestion of post-login but i even tried using that trigger.  
and checking whether login count 1 then run the action but still facing the same issue.  
That action also is not working for `google-auth` and `discord-login`.

Do you have any examples or something i could refer too ?

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [October 28, 2022, 6:20pm UTC](https://community.auth0.com/t/auth0-actions-user-registration-not-running-on-google-auth/93238/5 "2022-10-28T18:20:01Z")

</div>

Hey @abhijeet no problem, happy to help!

Hmm, the post login Action should trigger regardless of whether a user is Auth0 or federated (social connection) - I was just able to confirm this myself with Google user and a simple test Action like:

```auto
exports.onExecutePostLogin = async (event, api) => {

  if (event.authorization) {
    if (event.stats.logins_count == 1){
      console.log("made it here!")
    }
  
}

```

---

<div class="post-metadata">

**Author:** ![abhijeet](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/abhijeet/32/34674_2.png) [@abhijeet](https://community.auth0.com/u/abhijeet)\
**Post date:** [October 29, 2022, 3:00pm UTC](https://community.auth0.com/t/auth0-actions-user-registration-not-running-on-google-auth/93238/6 "2022-10-29T15:00:34Z")

</div>

> [@ty.frith](#):
>
> ```auto
> if (event.authorization) {
> if (event.stats.logins_count == 1){
> console.log("made it here!")
> }
> 
> ```

Thanks @ty.frith though the action didnt work but the creating rules resolved the issue.

---

<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 12, 2022, 3:01pm UTC](https://community.auth0.com/t/auth0-actions-user-registration-not-running-on-google-auth/93238/7 "2022-11-12T15:01:22Z")

</div>

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