Auth0 Home Blog Docs

How to select which db to use on Login



I have two db connections with auth0: connectionA and connectionB

at some point in my app I want to have a radial button asking the user whether they want to authenticate as an A user or a B user. For particular reasons, i dont want to merge this two database connections.

I am using Auth0 widget to authenticate. My application is connected to both databases in the auth0 page.

How do i choose to which db to authenticate against when the user presses login in my app?


If your radio button asks for the user type before showing Lock, you can then specify the connection when showing Lock as follows:{connections: 'YOUR_CONNECTION']});