Can You Add a login_hint to New Universal Login Using Passwordless Flow?

Hi. I am working in React, and we are using the New Universal Login and a passwordless flow, but when I add a login_hint to my parameters for loginWithRedirect, I get no email hinting in the Universal Login. My Code looks like this:

const handleLogin = async () => {
    await loginWithRedirect({
      prompt: "login",
      appState: {
        returnTo: "/enrollment/qualify",
      },
      login_hint: "bill@test.com",
    });
  };

If I hover over the login_hint, VS Code says that “This currently only affects the classic Lock experience.” We aren’t using classic, so is that why this is not working? I would just be a little surprised if there was no way to prefill the email address in the New Universal Login. Thanks!

Hi @wspence

Welcome to the Auth0 Community.

I assume if you’re using passwordless with New Universal Login you have configured Identifier First + Biometrics as currently there is no support for Email or SMS passwordless in the New Universal Login https://auth0.com/docs/authenticate/login/auth0-universal-login/new-universal-login-vs-classic-universal-login

If you are using the Biometrics flavour then unfortunately there is currently no way to direct the user to a WebAuthN prompt in the New Universal Login when using a login_hint. This issue is described in more detail here: Passing login_hint to New Universal Login page always prompts password so at present this is only supported with Email/SMS passwordless in Classic.

Warm regards.

OK. So I think I mis-spoke. I believe that we are using Classic Universal Login because we have not activated biometrics because we are only developing at this point and under Authentication>Passwordless, we only see this:

But we still are not getting any login hints entered for our email address using the code above. Are we doing something wrong, or does Passwordless not allow login_hint for Classic Universal Login?

Hi @wspence

Ah gotcha. In that case it might just be a small thing you’re missing.

Within Branding > Universal Login > Login tab check if you have the prefill object present:

Warm regards.

3 Likes

That did the trick! Glad you were here to help, I did not know that I needed to do anything to the template to make that happen!

Thank you @SaqibHussain

2 Likes

No problem, I’m glad I was able to help :raised_hands:

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.