Skip to main content
The Login class implements the login screen functionality. This screen collects the user’s identifier and password. Depending on your tenant, this identifer can be an email, phone number, or username.
ACUL Login

Constructors

Create an instance of Login screen manager
Example
import Login from "@auth0/auth0-acul-js/login";
const loginManager = new Login();
loginManager.login({
  username: "testUser",
  password: "testPassword"
});

Properties

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

Methods

federatedLogin
(options ?)
This method redirects the user to the social or enterprise identity provider (Idp) for authentiction.
Example
import Login from "@auth0/auth0-acul-js/login";
const loginManager = new Login();
loginManager.federatedLogin({
  connection: "google-oauth2"
});
Method Parameters
login
(options ?)
This method authenticates the user based on the identifier and provided password.
Example
import Login from "@auth0/auth0-acul-js/login";
const loginManager = new Login();
loginManager.login({
  username: "testUser",
  password: "testPassword"
});
Method Parameters
pickCountryCode
(options ?)
This method redirects the user to the country code selection list, where they can update the country code prefix for their phone numnber.
Example
import Login from "@auth0/auth0-acul-js/login";
const loginManager = new Login();
loginManager.pickCountryCode();
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.
getLoginIdentifiers
This method lets the active identifier types for the login screen. An array of active identifier types or null if none are active
Example
import Login from "@auth0/auth0-acul-js/login";
const loginManager = new Login();
loginManager.getLoginIdentifiers();