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: lock/login_pane.jsx at 8cebda3497724f01b21efaee45288d6c41543200 · auth0/lock · GitHub
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?