Email Identifier Challenge Screen

The Email Identifier Challenge screen is part of the Identifier First Authentication flow and verifies the user's email address before allowing them to sign up. For more details, review Activate and Configure Attributes for Flexible Identifiers.

Email Identifier Challenge

Context Data

The Universal Login Context Data contains unique-per-screen transaction and configuration data. Optional context data can be configured in the Management API with the context_configuration parameter. Read Universal Login Context for information about context data and read Configure Screens for details about optional context data.

interface EmailIdentifierChallenge {
  client: Client;
  organization?: Organization;
  prompt: Prompt;
  screen: {
    name: string;
    data: {
      email: string;
    };
  };
  transaction: Transaction;
};

Was this helpful?

/

Accessing Context Data

Using the Auth0 ACUL JS SDK to access the context data for each screen is recommended. The SDK provides properties and methods that simplify accessing the data.

Initialize the EmailIdentifierChallenge class to access its properties and methods.

import EmailIdentifierChallenge from '@auth0/auth0-acul-js/email-identifier-challenge';
const emailIdentifierChallengeManager = new EmailIdentifierChallenge();

// SDK Properties return a string, number or boolean
// ex. "email-identifier-challenge"
emailIdentifierChallengeManager.screen.name;

// SDK Methods return an object or array
// ex. { email: "someone@example.com" } 
emailIdentifierChallengeManager.screenData();

Was this helpful?

/

SDK Properties & Methods

The following groups of properties and methods are available on all screens. To learn more, read Auth0 ACUL JS SDK Shared Properties.

Property or Method Group Description
branding Information about the branding settings and default theme.
client Information about the client (i.e. Auth0 Application).
organization Information about the organization. This is only present if the client is part of an organization.
prompt Information about the current prompt.
screen Information about the current screen.
tenant Information about the Auth0 tenant.
transaction Information about the current authentication transaction.
unstrustedData Information submitted by the user that could potentially be unsafe, as well as certain parameters and custom query parameters passed to the /authorize call.

Screen Operations

The Email Identifier Challenge screen supports the following operations.

Continue with Code

Continue the transaction with the one-time password (OTP) code sent to the email address provided in the previous step. This operation verifies the provided email address and allows the user to continue signing up.

JS SDK Method: submitEmailChallenge()

Parameter Type Required Description
code string Yes The OTP code sent to the email address.

emailIdentifierChallenge.submitEmailChallenge({
  code: <CodeFieldValue>
});

Was this helpful?

/

Resend Code

Send a new OTP code to the phone number provided in the previous step.

JS SDK Method: resendCode()

// This method does not support any parameters
emailIdentifierChallenge.resendCode();

Was this helpful?

/

Go Back

Return the user to the previous step.

JS SDK Method: resendToPrevious()

// This method does not support any parameters
emailIdentifierChallenge.returnToPrevious();

Was this helpful?

/