Pre Registration hook not running when creating a Passwordless user

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

The Pre-User Registration extensibility point is available for Database Connections and Passwordless Connections.

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

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

1 Like

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

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

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

1 Like

@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)

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

Hi,

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

Cheers,
Seb

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

1 Like

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

1 Like

Thanks a lot for that Sid!

1 Like

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

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.

Hey there @sidharth.chaudhary !

Have you received any update from engineering on this one?

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

1 Like

Perfect! Thanks for doing that!

@sidharth.chaudhary Any update on this issue?

@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!

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.

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.

1 Like

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

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

1 Like