Unable to show the user's email address on the mfa-otp-challenge screen

I am unable to show the user’s email in the description or placeholder on the mfa-otp-challenge screen.

The default description text is “Check your preferred one-time password application for a code.”

The default placeholder text is “Enter your one-time code”

I would like to change either of those to include the user’s email address.

I am on the custom text page of our Auth0 dashboard: https://(subdomain).auth0.com/dashboard/pi/(app-name)/custom_text

I am able navigate to Language=English, Prompt=mta-otp, Screen=mta-otp-challenge

I am able to update the text in the description and placeholder text inputs, Save, and see the static text changes reflected on my MFA screen.

However it fails when i try to use the ${email} page template variable, no text appears for that variable. For example: “Please enter the one-time code for ${email}.” always renders as “Please enter the one-time code for .”

I have tried other variables as well:

  • ${userName}
  • ${email}
  • ${user.user_id}
  • ${user.email}
  • ${user.email_verified}
  • ${user.app_metadata}
  • ${user.user_metadata}
  • ${user.name}
  • ${user.nickname}
  • ${user.username}

None of those variables render.

I want to show the email address that the user entered because sometimes ppl log into our app using different accounts, so they need to verify they are entering the one-time code for the proper account.

Please help me to get this working.


1 Like

Hi @tweatherly

Welcome to the Auth0 Community.

The available variables are different for each screen and by default there are no user specific variables used on the mfa-otp-challenge screen so it seems they are not available here, see https://auth0.com/docs/customize/universal-login-pages/customize-login-text-prompts#variables

I would suggest you add some feedback here https://auth0.com/feedback if this is something you would like to see available.

Warm regards.

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