Cannot specify passwordless as connection using auth0-react and loginWithRedirect

I’m using the auth0-react library in a React spa application. I have my auth0 application configured to support Passwordless (email) and a social connection.

When calling loginWithRedirect from my client, I can specify the connection name for the social provider and the login experience will start the user directly there, as desired.

Likewise, I need to be able to specify passwordless or email in the connection parameter passed to loginWithRedirect for other user flows but this does not seem to be honored. Regardless of what I pass in as the connection parameter I am presented with the standard ‘choose a connection’ dialog, which I do not want the user to see.

Ideally, the login_hint value containing the user’s entered email address would also be honored and the user would be sitting on a page asking for the code which was just emailed to them.

Is the above supported? If so, does anyone have an example of this working?

Hi @Scheffler,

Have you configured the Universal Login page to work with Passwordless? There are some additional steps required, and Passwordless via Email is not supported for the New Universal Login experience if you are using that.

1 Like

Thanks for the help. Yes, I have. I did figure out after a bit that I needed to move from New Universal to Classic Universal.

Passwordless is working fine. It’s just when I add a second connection to the app (social in my case) then I can no longer get the login screen to show me just passwordlesss. If I pass in the name of the social connection to loginWithRedirect then it handles that fine and takes me immediately to the social login page.

However, I can’t seem to find any connection string name which would just show me passwordless. If I don’t pass in the name of the social connection then it shows me the universal login with both connection options on the dialog.

Does using connection=email in your /authorize?... request help? This should route the user straight into the passwordless connection using email.

1 Like

No. I’ve passed ‘email’, ‘passwordless’, and a few other variations as the connection value to loginWithRedirect and it doesn’t get honored. If I pass in the name of the social connection it works as expected.

Could you please DM me a HAR file capturing your full attempt to get the login screen to use the passwordless connection in a private/incognito window?
Please use this guide when generating the HAR:

This will provide some useful contextual information to help me look into this further

1 Like