We are trying to avoid the “Account Linking” solution when a user registers with Social connection (Google/Microsoft) and then it also tries to sign-up with Username/Password by using a pre-user-registration action and provide with an error message to keep usernames unicity.
Do you have a sample code to use for this action?
Thanks in advance.
Welcome to the Auth0 Community!
I understand that you are looking for a sample Action that prevents users from registering with a redundant username.
Unfortunately, there are no Action Templates available to accomplish this task. If you decide to implement the logic with an Action, you may find the Event and API Objects useful.
Next, I’d like to clarify that Usernames are unique and cannot be used more than once. Additionally, signing up with a Social Connection does not populate a Username property as seen with Database Connections.
Because of this, you should not encounter any Username conflicts when your users sign up with a Database and Social Connection.
However, you may still want to consider linking the two accounts together to have a centralized user profile.
Doing so will allow you to manage your users more effectively.
Please let me know if you’ve any further questions. I’d be happy to clarify.
This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.