We were using Auth0 lock successfully for a long time using email and password (no username). We are now in the process of converting an old system that has usernames and passwords only. I created a new database connection, and using a connectionResolver I dynamically select which connection to query (if there’s a “@” I select the current one, otherwise I select the legacy one)
That all worked fine in dev, but when I tried to configure this in production, I was unable to proceed. The usernameStyle option of Lock is ignored because my first database is email only, and there are no way to “force” using another field.
Here we see I could theoritically use usernameStyle: https://github.com/auth0/lock/blob/8cebda3497724f01b21efaee45288d6c41543200/src/connection/database/login_pane.jsx
But in practice, here Lock just takes the default connection and ignores any other settings: databaseConnectionRequiresUsername
I understand that’s the documented behavior, but how then can I use my second database? Is there any workaround that doesn’t involve rewriting the whole thing?