Pre User Registration should not run for existing users

It might be a bug, or a feature, but we are experiencing pre-user-registration hooks running on “normal” login! (login type is passwordless).

Hi @alexab,

Thanks for reporting this behavior! I am checking with the team about this.

I heard back from the team responsible for Actions/hooks, and I’ve created a ticket regarding this issue. Thanks again for reporting it!

1 Like

Hi @stephanie.chamblee

I have run into the exact same issue with the Pre UserRegistration hook/custom action runs even when the user tries to login, where the login method is Passwordless + SMS.

The use case is fetching an external User Id and setting that value in the user’s metadata.

I am also having issues with the api.setUserMetadata method. It does not work as excepted. The registered user’s metadata is empty.

I can create a separate ticket for this.

Thanks

Hi @vivek.rajagopal,

I’ve followed up about this to get an update and will let you know when I hear back.

Just to make sure, has the custom action been attached to a flow? Write Your First Action

Thanks, and yes the Custom Action has been attached to the Pre Registration Flow. I am able to get logs out of the Custom Action using the Auth0 Logs Extension. I can even log the body of the metadata I wish to persist. Unfortunately, when I inspect the body of the user’s metadata afterwards, it is empty.

Hi @vivek.rajagopal,

I’ve heard back from Engineering that there is a known limitation in the pre-user registration action trigger that it will not set metadata using api.setUserMetadata when using the Passwordless OTP flow. The documentation will be updated soon to clarify this limitation. There is also an item to fix this limitation, however, I don’t have a specific release date for when it will be resolved.

I’m experiencing the same bug, the pre-registration actions trigger when a user attempts to login using passwordless login. I have an action that denies access if a user is registered with an existing email which is obviously triggered on login since the user is logging in with an existing account. Am I misunderstanding the flows? I had assumed pre-registration would only run when I called for example management.users.create.

Hi!

Has there been any progress on this limitation? I think I’m still facing it a year later.

I’ve also tried the pre-user-registration hook, but it seems like it has the same limitation.

My use case is that I want to write a flag into the app_metadata that I’d check for in post-login.

Any updates or workaround regarding this would be much appreciated.

BR,
Goran

Hi! Also curious if this has been resolved.

This issue has been solved behind a feature flag. Please open a support ticket to get it resolved for you.

2 Likes

Thank you @Saltuk for following up on that!

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