Account linking - Second connection not tried - error: wrong username and password


The goal is to end up with one account in Auth0 with data aggregated from multiple databases.

Two apps, same two database connections configured for both. Both connections have “Import Users to Auth0” enabled.

User logs in for the first time. Email and password matches user in the first connection. User is successfully imported to Auth0 and user is successfully authenticated.

Logging out from the application. User logs into the second app using the same email, however, using the password from the other DB. Auth0 throws bad username and password. The password is only validated based on the password used in the first login. Auth0 does not try the second connection where the password would match.

Note! In the PoC environment we only use one app, but should be the same as using two apps. If the password does not match the account imported to Auth0, it should try the second connection to trigger account linking and importing additional data from the second connection.

Thank you,

Hi @nahvinden ,

I understand your goal. Unfortunately if multiple databases are enabled for an application, only one will be used and the others will not be searched through to see if the user exists elsewhere or if the password is valid.

Not sure why your users are stored in two databases. If your users can be consolidated into one database, you should be able to use account linking feature without error.

Hope this helps!