# Pre Registration hook not running when creating a Passwordless user

**URL:** <https://community.auth0.com/t/pre-registration-hook-not-running-when-creating-a-passwordless-user/50968>\
**Category:** Get Help\
**Created:** [October 5, 2020, 8:16am UTC](https://community.auth0.com/t/pre-registration-hook-not-running-when-creating-a-passwordless-user/50968 "2020-10-05T08:16:15Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![JanC](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/janc/32/24618_2.png) [@JanC](https://community.auth0.com/u/JanC)\
**Post date:** [October 5, 2020, 8:16am UTC](https://community.auth0.com/t/pre-registration-hook-not-running-when-creating-a-passwordless-user/50968/1 "2020-10-05T08:16:15Z")

</div>

Hi,

I’m in a scenario where I create Passwordless users using the management API. For each created user I’d like to run a Pre-registration hook but those don’t seem to be working when using the Paswordless connection. I tried with the `Username-Password-Authentication` DB and there it runs fine.

According [to the docs](https://auth0.com/docs/hooks/extensibility-points/pre-user-registration)

> The Pre-User Registration extensibility point is available for [Database Connections](https://auth0.com/docs/connections/database) and [Passwordless Connections](https://auth0.com/docs/connections/passwordless).

My hook is basically the template one but I put it here for reference

```auto
module.exports = function (user, context, cb) {
  var response = {};

  response.user = user;

  // Add user or app metadata to the newly created user
  response.user.user_metadata = { foo: 'bar' };
  response.user.app_metadata = { vip: true, score: 7 };

  cb(null, response);
};

```

After creating the user in the `Passwordless` DB with the API, I do not see those `metadata`. When I create a user in the `Username-Password-Authentication` DB, I do see them

Did I miss something?

thanks for your help

---

<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 5, 2020, 9:46am UTC](https://community.auth0.com/t/pre-registration-hook-not-running-when-creating-a-passwordless-user/50968/2 "2020-10-05T09:46:37Z")

</div>

Hey @JanC,

I have tested and can confirm the same behavior for passwordless sms and email.

During a passwordless signup (sms or email) the pre reg hook runs, but the user\_metadata is never set. The same hook works fine with a db connection signup.

When i checked further internally it has been already filed as a bug with our engineering teams and it has been added as a backlog item. I don’t have an ETA though on this at the moment!

Regards,  
Sidharth

---

<div class="post-metadata">

**Author:** ![JanC](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/janc/32/24618_2.png) [@JanC](https://community.auth0.com/u/JanC)\
**Post date:** [October 5, 2020, 11:29am UTC](https://community.auth0.com/t/pre-registration-hook-not-running-when-creating-a-passwordless-user/50968/3 "2020-10-05T11:29:03Z")

</div>

Hi @sidharth.chaudhary

thanks for your answer and for confirming that it’s a bug in your backlog.

Is there a way to get notified when it’s fixed?

cheers  
Jan

---

<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 6, 2020, 2:39am UTC](https://community.auth0.com/t/pre-registration-hook-not-running-when-creating-a-passwordless-user/50968/4 "2020-10-06T02:39:49Z")

</div>

Hey @JanC,

No direct way as such. to get the status, you can either check back in the community after sometime or open a support ticket with our support team to check the status after some time.

Regards,  
Sidharth

---

<div class="post-metadata">

**Author:** ![JanC](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/janc/32/24618_2.png) [@JanC](https://community.auth0.com/u/JanC)\
**Post date:** [October 22, 2020, 1:11pm UTC](https://community.auth0.com/t/pre-registration-hook-not-running-when-creating-a-passwordless-user/50968/5 "2020-10-22T13:11:35Z")

</div>

@sidharth.chaudhary  
is there any workaround for the time being? Or maybe can you advice me how to solve this use case:

For any created user in Auth0, we need to create a user in our internal DB and associate our `internal_user_id` with the Auth0 user.

This `internal_user_id` is then sent inside the JWT in the meta data to the user app. Each request from the app sends the JWT (including the `internal_user_id` to our servers). This allows to associate each requests from the app to the user who sent it.

(We use [Hasura and its Auth0 plugin](https://hasura.io/docs/1.0/graphql/core/guides/integrations/auth0-jwt.html))

I believe the Per-User Registration hooks were made exactly for this scenario. The problem is that since they don’t work for the OTP connections, it makes it impossible for us to use Auth0 as an authentication provider.

thanks in advance  
Jan

---

<div class="post-metadata">

**Author:** ![sebhs](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/sebhs/32/26203_2.png) [@sebhs](https://community.auth0.com/u/sebhs)\
**Post date:** [December 11, 2020, 9:01am UTC](https://community.auth0.com/t/pre-registration-hook-not-running-when-creating-a-passwordless-user/50968/6 "2020-12-11T09:01:27Z")

</div>

Hi,

Just wanted to check if this has been fixed in the meantime since I am still seeing issues with this.

Cheers,  
Seb

---

<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:** [December 11, 2020, 9:31am UTC](https://community.auth0.com/t/pre-registration-hook-not-running-when-creating-a-passwordless-user/50968/7 "2020-12-11T09:31:26Z")

</div>

@sidharth.chaudhary would you be able to follow-up on that? Thanks!

---

<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:** [December 12, 2020, 12:23am UTC](https://community.auth0.com/t/pre-registration-hook-not-running-when-creating-a-passwordless-user/50968/8 "2020-12-12T00:23:09Z")

</div>

Hey @sebhs, I am currently following up on this backlog item internally, Currently its not yet addressed and is in backlog.

---

<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:** [December 14, 2020, 11:15am UTC](https://community.auth0.com/t/pre-registration-hook-not-running-when-creating-a-passwordless-user/50968/9 "2020-12-14T11:15:59Z")

</div>

Thanks a lot for that Sid!

---

<div class="post-metadata">

**Author:** ![mykola.ishchuk](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/mykola.ishchuk/32/27643_2.png) [@mykola.ishchuk](https://community.auth0.com/u/mykola.ishchuk)\
**Post date:** [February 16, 2021, 5:45pm UTC](https://community.auth0.com/t/pre-registration-hook-not-running-when-creating-a-passwordless-user/50968/10 "2021-02-16T17:45:57Z")

</div>

Hi there!  
Any updates on the issue? Looks like it still doesn’t work  
Cheers

---

<div class="post-metadata">

**Author:** ![thijmen96](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/thijmen96/32/20356_2.png) [@thijmen96](https://community.auth0.com/u/thijmen96)\
**Post date:** [February 28, 2021, 3:53pm UTC](https://community.auth0.com/t/pre-registration-hook-not-running-when-creating-a-passwordless-user/50968/11 "2021-02-28T15:53:58Z")

</div>

Hi (subtle ping)! Running into this same issue. Would be great if we could get the roughest of ETAs, so we can decide if we should work around it, or wait for the fix.

---

<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 1, 2021, 9:49am UTC](https://community.auth0.com/t/pre-registration-hook-not-running-when-creating-a-passwordless-user/50968/12 "2021-03-01T09:49:59Z")

</div>

Hey there @sidharth.chaudhary !

Have you received any update from engineering on this one?

---

<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:** [March 4, 2021, 6:38am UTC](https://community.auth0.com/t/pre-registration-hook-not-running-when-creating-a-passwordless-user/50968/13 "2021-03-04T06:38:21Z")

</div>

@konrad.sopala , As of now this item is still in the backlog, I will follow up with engineering on it.

---

<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 4, 2021, 9:07am UTC](https://community.auth0.com/t/pre-registration-hook-not-running-when-creating-a-passwordless-user/50968/14 "2021-03-04T09:07:17Z")

</div>

Perfect! Thanks for doing that!

---

<div class="post-metadata">

**Author:** ![alma](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/alma/32/28521_2.png) [@alma](https://community.auth0.com/u/alma)\
**Post date:** [April 1, 2021, 5:06am UTC](https://community.auth0.com/t/pre-registration-hook-not-running-when-creating-a-passwordless-user/50968/15 "2021-04-01T05:06:32Z")

</div>

@sidharth.chaudhary Any update on this issue?

---

<div class="post-metadata">

**Author:** ![devko](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/devko/32/28592_2.png) [@devko](https://community.auth0.com/u/devko)\
**Post date:** [April 5, 2021, 9:21pm UTC](https://community.auth0.com/t/pre-registration-hook-not-running-when-creating-a-passwordless-user/50968/16 "2021-04-05T21:21:43Z")

</div>

@sidharth.chaudhary  
Please address this issue! This is a very common use case and we need to understand if should continue with auth0 or not!  
thanks!

---

<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:** [April 6, 2021, 7:14am UTC](https://community.auth0.com/t/pre-registration-hook-not-running-when-creating-a-passwordless-user/50968/17 "2021-04-06T07:14:36Z")

</div>

Hey there everyone!

Sorry for the inconvenience and all the delay in messaging but we’re doing our best to advocate for your needs. We will let you know once we have any updates from engineering.

---

<div class="post-metadata">

**Author:** ![dima](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dima/32/25349_2.png) [@dima](https://community.auth0.com/u/dima)\
**Post date:** [April 6, 2021, 1:28pm UTC](https://community.auth0.com/t/pre-registration-hook-not-running-when-creating-a-passwordless-user/50968/18 "2021-04-06T13:28:38Z")

</div>

Hy could you confirm if this bug is high priority for auth0 team, my team is doing POC with passwordless flow and it’s a real blocker for us.

---

<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:** [April 6, 2021, 2:39pm UTC](https://community.auth0.com/t/pre-registration-hook-not-running-when-creating-a-passwordless-user/50968/19 "2021-04-06T14:39:49Z")

</div>

I just wrote on this today. Please check the upper message.

---

<div class="post-metadata">

**Author:** ![devko](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/devko/32/28592_2.png) [@devko](https://community.auth0.com/u/devko)\
**Post date:** [April 9, 2021, 3:06pm UTC](https://community.auth0.com/t/pre-registration-hook-not-running-when-creating-a-passwordless-user/50968/20 "2021-04-09T15:06:02Z")

</div>

hi @konrad.sopala!  
how long usually does it take to get the feedback from your Engineering team ?  
thanks

[Next page](https://community.auth0.com/t/pre-registration-hook-not-running-when-creating-a-passwordless-user/50968.md?page=2)
