Getting the user password after register with username-password

Hi,
I want to use an action that runs after every register.
The action should take the user information, send it to my backend, and store it in the database.
The problem is that when I checked the event object here:

exports.onExecutePostUserRegistration = async (event, api) => {
console.log(event)
};

I didn’t see the user’s password if he/she was registered with a password-email strategy.
I want to make a replica of each new user, including those who registered with email.

Is the thing even possible?
Thank you all :slight_smile:

Hi @roeishoustak91,

Welcome to the Auth0 Community!

The user’s password is not part of the event object as you have discovered. See our Actions Triggers: post-login - Event Object documentation for the full list of callable properties.

And to answer your question, it will not be possible to duplicate a user since the user’s email address is one of the unique identifiers (the other being the user_id) for authentication. Meaning you cannot create the same user with the same email address.

Thanks,
Rueben

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