Skip to main content

Documentation Index

Fetch the complete documentation index at: https://auth0-feat-authentication-api-migration.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

The LoginPasswordlessEmailCode class implements the login-passwordless-email-code screen functionality. This screen collects the user’s email and code.
Login Passwordless Email Code

Constructors

Create an instance of LoginPasswordlessEmailCode screen manager:
Example
import LoginPasswordlessEmailCode from '@auth0/auth0-acul-js/login-passwordless-email-code';
const loginPasswordlessEmailCodeManager = new LoginPasswordlessEmailCode();
loginPasswordlessEmailCodeManager.submitCode({
  code: '123456',
});

Properties

Provides branding-related configurations, such as branding theme and settings.
Provides client-related configurations, such as id, name, and logoUrl, for the login-passwordless-email-code screen.
Provides information about the user’s Organization, such as id and name.
Contains data about the current prompt in the authentication flow.
Contains details specific to the login-passwordless-email-code screen, including its configuration and context.
Contains data related to the tenant, such as id and associated metadata.
Provides transaction-specific data for the login-passwordless-email-code screen, such as active identifiers and flow states.
Handles untrusted data passed to the SDK, such as user input during login.
Details of the active user, including username, email, and roles.

Methods

changeLanguage
Promise<void>
This method changes the display language of the Universal Login page.
Example
import LoginPasswordlessEmailCode from '@auth0/auth0-acul-js/login-passwordless-email-code';
const loginPasswordlessEmailCodeManager = new LoginPasswordlessEmailCode();
loginPasswordlessEmailCodeManager.changeLanguage({
  language: 'fr',
});
Method Parameters

getErrors
This method retrieves the array of transaction errors from the context, or an empty array if none exist. An array of error objects from the transaction context.
resendCode
Promise<void>
This method resends the code to the user’s email address.
Example
import LoginPasswordlessEmailCode from '@auth0/auth0-acul-js/login-passwordless-email-code';
const loginPasswordlessEmailCodeManager = new LoginPasswordlessEmailCode();
loginPasswordlessEmailCodeManager.resendCode();
Method Parameters

resendManager
This method provides resend functionality with timeout management. It returns a ResendControl object with a startResend() method that triggers the resend and enforces a cooldown period before the user can resend again.
Example
import LoginPasswordlessEmailCode from '@auth0/auth0-acul-js/login-passwordless-email-code';

const loginPasswordlessEmailCodeManager = new LoginPasswordlessEmailCode();
const { startResend } = loginPasswordlessEmailCodeManager.resendManager({
  timeoutSeconds: 15,
  onStatusChange: (remainingSeconds, isDisabled) => {
    console.log(`Resend available in ${remainingSeconds}s, disabled: ${isDisabled}`);
  },
  onTimeout: () => {
    console.log('Resend is now available');
  }
});

// Call startResend when user clicks resend button
startResend();
Method Parameters

submitCode
Promise<void>
This method continues the login process using the email code.
Example
import LoginPasswordlessEmailCode from '@auth0/auth0-acul-js/login-passwordless-email-code';
const loginPasswordlessEmailCodeManager = new LoginPasswordlessEmailCode();
loginPasswordlessEmailCodeManager.submitCode({
  code: '123456',
});
Method Parameters

switchConnection
Promise<void>
This method switches between a database connection (password) and a passwordless connection (Email/SMS OTP).
Example
import LoginPasswordlessEmailCode from '@auth0/auth0-acul-js/login-passwordless-email-code';
const loginPasswordlessEmailCodeManager = new LoginPasswordlessEmailCode();
loginPasswordlessEmailCodeManager.switchConnection({
  connection: 'email',
});
Method Parameters