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