I’m using username-based login in my Auth0 setup. I have multiple database connections, each representing a different user group.
Here’s the issue:
- I have a user with the username
john_doe
in Database A. - When I try to create a new user with the same username (
john_doe
) in Database B, I receive a “user already exists” error.
This is unexpected because I assumed usernames should be unique per connection, not globally across all database connections.
Expected Behavior:
I should be able to create users with the same username in different database connections, as long as they are isolated.
Actual Behavior:
Auth0 throws a user already exists
error even though the user is being created in a different connection.
Steps to Reproduce:
- Create a user with username
john_doe
in Connection A. - Attempt to create another user with the same username in Connection B.
- Observe the error.
Questions:
- Is this expected behavior?
- Is there a workaround or configuration that allows username reuse across different database connections?