Logout screen classes

Logout screen class

The Logout screen class provides methods associated with the logout screen. This screen allows users to confirm or deny the logout action.

Import and instantiate the Logout screen class:

import Logout from '@auth0/auth0-acul-js/logout';
const logout = new Logout();

// SDK Properties return a string, number or boolean
// ex. "logout"
logout.screen.name;

// SDK Methods return an object or array
// ex. { signup: "/signup_url", reset_password: "/reset_password_url"} 
await logout.confirmLogout({ action: 'accept' });

Was this helpful?

/

Properties

The Logout screen class properties are:

interface branding {
  settings: null | BrandingSettings;
  themes: null | BrandingThemes;
}

interface BrandingSettings {
  colors?: {
    pageBackground?: string | {
      angleDeg: number;
      end: string;
      start: string;
      type: string;
    };
    primary?: string;
  };
  faviconUrl?: string;
  font?: {url: string;};
  logoUrl?: string;
}

interface BrandingThemes {
  default: {
    borders: Record<string, string | number | boolean>;
    colors: Record<string, string>;
    displayName: string;
    fonts: Record<string, string | boolean | object>;
    pageBackground: Record<string, string>;
    widget: Record<string, string | number>;
  };
}

Was this helpful?

/

Methods

The Logout screen class method is:

confirmLogout( options ?)

This method confirms the logout action (accept or deny).

import Logout from '@auth0/auth0-acul-js/logout';

const logout = new Logout();

await logout.confirmLogout({ action: 'accept' });

Was this helpful?

/

Parameter Type Required Description
action accept | deny Yes The authentication transaction state
[key: string] string | number | boolean | undefined No Additional data collected from the user.

Logout Aborted screen class

The Logout Aborted screen class provides methods associated with the logout-aborted screen. This screen is displayed when a user aborts the logout process.

Import and instantiate the Logout Aborted screen class:

import LogoutAborted from '@auth0/auth0-acul-js/logout-aborted';

const logoutAborted = new LogoutAborted();

// SDK Properties return a string, number or boolean
// ex. "logout-aborted"
logoutAborted.screen.name;

Was this helpful?

/

Properties

The Logout Aborted screen class properties are:

interface branding {
  settings: null | BrandingSettings;
  themes: null | BrandingThemes;
}

interface BrandingSettings {
  colors?: {
    pageBackground?: string | {
      angleDeg: number;
      end: string;
      start: string;
      type: string;
    };
    primary?: string;
  };
  faviconUrl?: string;
  font?: {url: string;};
  logoUrl?: string;
}

interface BrandingThemes {
  default: {
    borders: Record<string, string | number | boolean>;
    colors: Record<string, string>;
    displayName: string;
    fonts: Record<string, string | boolean | object>;
    pageBackground: Record<string, string>;
    widget: Record<string, string | number>;
  };
}

Was this helpful?

/

Logout Complete screen class

The Logout Complete screen class provides methods associated with the logout-complete screen. This screen is displayed when a user completes the logout process.

Import and instantiate the Logout Complete screen class:

import LogoutComplete from '@auth0/auth0-acul-js/logout-complete';

const logoutComplete = new LogoutComplete();

// SDK Properties return a string, number or boolean
// ex. "logout-complete"
logoutComplete.screen.name;

Was this helpful?

/

Properties

The Logout Complete screen class properties are:

interface branding {
  settings: null | BrandingSettings;
  themes: null | BrandingThemes;
}

interface BrandingSettings {
  colors?: {
    pageBackground?: string | {
      angleDeg: number;
      end: string;
      start: string;
      type: string;
    };
    primary?: string;
  };
  faviconUrl?: string;
  font?: {url: string;};
  logoUrl?: string;
}

interface BrandingThemes {
  default: {
    borders: Record<string, string | number | boolean>;
    colors: Record<string, string>;
    displayName: string;
    fonts: Record<string, string | boolean | object>;
    pageBackground: Record<string, string>;
    widget: Record<string, string | number>;
  };
}

Was this helpful?

/