Skip to main content
The Consent class implements the consent screen functionality. This screen presents the requested permissions to the user and collects their decision to accept or deny access.

Constructors

Create an instance of Consent screen manager
Example
import Consent from '@auth0/auth0-acul-js/consent';
const consentManager = new Consent();
const handleAccept = async () => {
  await consentManager.accept();
};

Properties

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

Methods

accept
(options ?)
This method submits the user’s decision to accept (grant) the requested permissions.
Example
import Consent from '@auth0/auth0-acul-js/consent';
const consentManager = new Consent();
const handleAccept = async () => {
  await consentManager.accept();
  console.log('Consent accepted successfully.');
};
options
OPTIONAL
Optional payload.
deny
(options ?)
This method submits the user’s decision to deny (reject) the requested permissions.
Example
import Consent from '@auth0/auth0-acul-js/consent';
const consentManager = new Consent();
const handleDeny = async () => {
  await consentManager.deny();
  console.log('Consent denied successfully.');
};
options
OPTIONAL
Optional payload.
getErrors
This method retrieves the array of transaction errors from the context, or an empty array if none exist.