We are looking for the best way to support users login with username. However, we don’t want to ask all user for a username upon registration, so the “requires username” option in database connections is not an option. We will be creating users that should log with username using the API directly. Our best alternative so far is to create users with email like email@example.com and modify Lock to support logins with username, capture the login intent and adding fakedomain.com to the email sent to Auth0 API, but seems like a lot of trouble for something that should be simpler (plus we would need to modify Lock and Lock.Android). We don’t want to tell the user to type the whole fakedomain.com email.
Another alternative would be to user two different database connections, each for each kind of users but specifying the connection before hand is not an option when a user tries to login.
Is there a better alternative? Which would be the best solution for this problem?