Authentification multifacteur (MFA) par SMS – Classes d’écrans

Classe d’écran Défi-réponse de la MFA par SMS

La classe d’écran Défi-réponse de la MFA par SMS fournit des méthodes associées à l’écran mfa-sms-challenge.

Importez et instanciez la classe d’écran Défi-réponse de la MFA par SMS :

import MfaSmsChallenge from '@auth0/auth0-acul-js/mfa-sms-challenge';
const mfaSmsChallenge = new MfaSmsChallenge();

// SDK Properties return a string, number or boolean
// ex. "login-id"
mfaSmsChallenge.screen.name;

// SDK Methods return an object or array
await mfaSmsChallenge.continueMfaSmsChallenge({
  code: '123456',
  rememberBrowser: true,
});

Was this helpful?

/

Propriétés

Propriétés de la classe d’écran Défi-réponse de la MFA par SMS :

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?

/

Méthodes

Propriétés de la classe d’écran Défi-réponse de la MFA par SMS :

continueMfaSmsChallenge( options ?)

Cette méthode soumet le code de vérification saisi et l’option rememberBrowser.

import MfaSmsChallenge from '@auth0/auth0-acul-js/mfa-sms-challenge';

const mfaSmsChallenge = new MfaSmsChallenge();
await mfaSmsChallenge.continueMfaSmsChallenge({
  code: '123456',
  rememberBrowser: true,
});

Was this helpful?

/

Parameter                  Type Required Description
code chaîne Oui Le code saisi par l’utilisateur.
rememberBrowser booléen Non Mémoriser la configuration du navigateur de l’utilisateur.
[key: string] chaîne | nombre | booléen | non défini Non Données facultatives collectées auprès de l’utilisateur.

getACall( options ?)

Cette méthode permet d’envoyer le code de vérification par appel vocal.

import MfaSmsChallenge from '@auth0/auth0-acul-js/mfa-sms-challenge';

const mfaSmsChallenge = new MfaSmsChallenge();
await mfaSmsChallenge.getACall();

Was this helpful?

/

Parameter                  Type Required Description
[key: string] string | number | boolean | undefined No Optional data collected to user.

pickSms( options ?)

Cette méthode permet à l’utilisateur de sélectionner une configuration SMS différente, le cas échéant.

import MfaSmsChallenge from '@auth0/auth0-acul-js/mfa-sms-challenge';

const mfaSmsChallenge = new MfaSmsChallenge();
await mfaSmsChallenge.pickSms();

Was this helpful?

/

Parameter                  Type Required Description
[key: string] string | number | boolean | undefined No Optional data collected to user.

resendCode( options ?)

Cette méthode renvoie le code SMS.

import MfaSmsChallenge from '@auth0/auth0-acul-js/mfa-sms-challenge';

const mfaSmsChallenge = new MfaSmsChallenge();
await mfaSmsChallenge.resendCode();

Was this helpful?

/

Parameter                  Type Required Description
[key: string] string | number | boolean | undefined No Optional data collected to user.

tryAnotherMethod( options ?)

Cette méthode soumet l’action pour essayer une autre méthode de MFA.

import MfaSmsChallenge from '@auth0/auth0-acul-js/mfa-sms-challenge';

const mfaSmsChallenge = new MfaSmsChallenge();
await mfaSmsChallenge.tryAnotherMethod();

Was this helpful?

/

Parameter                  Type Required Description
[key: string] string | number | boolean | undefined No Optional data collected to user.

Classe d’écran Inscription MFA par SMS

La classe d’écran Inscription MFA par SMS fournit des méthodes associées à l’écran mfa-sms-challenge.

Importez et instanciez la classe d’écran Inscription MFA par SMS :

import MfaSmsEnrollment from '@auth0/auth0-acul-js/mfa-sms-enrollment';
const mfaSmsEnrollment = new MfaSmsEnrollment();

// SDK Properties return a string, number or boolean
// ex. "login-id"
mfaSmsEnrollment.screen.name;

// SDK Methods return an object or array
await mfaSmsEnrollment.pickCountryCode();

Was this helpful?

/

Propriétés

Propriétés de la classe d’écran Défi-réponse MFA par SMS :

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?

/

Méthodes

Propriétés de la classe d’écran Défi-réponse MFA par SMS :

continueEnrollment( options ?)

Cette méthode poursuit le processus d’inscription par SMS avec le numéro de téléphone fourni.

import MfaSmsEnrollment from '@auth0/auth0-acul-js/mfa-sms-enrollment';

const mfaSmsEnrollment = new MfaSmsEnrollment();
await mfaSmsEnrollment.continueEnrollment({ phone: '1234567890' });

Was this helpful?

/

Parameter                  Type Required Description
captcha chaîne Conditionnellement Le code captcha ou la réponse du fournisseur de captcha.
phone chaîne Non Le numéro de téléphone saisi par l’utilisateur.
[key: string] chaîne | nombre | booléen | non défini Non Données facultatives collectées auprès de l’utilisateur.

pickCountryCode( options ?)

Cette méthode gère l’action de sélection d’un code pays pour l’inscription par SMS.

import MfaSmsEnrollment from '@auth0/auth0-acul-js/mfa-sms-enrollment';

const mfaSmsEnrollment = new MfaSmsEnrollment();
await mfaSmsEnrollment.pickCountryCode();

Was this helpful?

/

Parameter                  Type Required Description
[key: string] string | number | boolean | undefined No Optional data collected to user.

tryAnotherMethod( options ?)

Cette méthode gère l’action qui consiste à essayer une autre méthode de MFA.

import MfaSmsEnrollment from '@auth0/auth0-acul-js/mfa-sms-enrollment';

const mfaSmsEnrollment = new MfaSmsEnrollment();
await mfaSmsEnrollment.tryAnotherMethod();

Was this helpful?

/

Parameter                  Type Required Description
[key: string] string | number | boolean | undefined No Optional data collected to user.

Classe d’écran Liste MFA par SMS

La classe d’écran Liste MFA par SMS fournit des méthodes associées à l’écran mfa-sms-list.

Importez et instanciez la classe d’écran Liste MFA par SMS :

import MfaSmsList from '@auth0/auth0-acul-js/mfa-sms-list';
const mfaSmsList = new MfaSmsList();

// SDK Properties return a string, number or boolean
// ex. "login-id"
mfaSmsList.screen.name;

// SDK Methods return an object or array
// ex. { signup: "/signup_url", reset_password: "/reset_password_url"} 
await mfaSmsList.backAction();

Was this helpful?

/

Propriétés

Propriétés de la classe d’écran Liste MFA par SMS :

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?

/

Méthodes

Propriétés de la classe d’écran Défi-réponse MFA par SMS :

backAction( options ?)

Cette méthode permet à l’utilisateur de revenir à l’écran précédent.

import MfaSmsList from '@auth0/auth0-acul-js/mfa-sms-list';

const mfaSmsList = new MfaSmsList();
await mfaSmsList.backAction();

Was this helpful?

/

Parameter                  Type Required Description
[key: string] string | number | boolean | undefined No Optional data collected to user.

selectPhoneNumber( options ?)

Cette méthode permet à l’utilisateur de sélectionner un numéro de téléphone dans la liste des numéros de téléphone inscrits.

import MfaSmsList from '@auth0/auth0-acul-js/mfa-sms-list';

const mfaSmsList = new MfaSmsList();
await mfaSmsList.selectPhoneNumber({
  index: 0 // for demonstration we are selecting the first index
});

Was this helpful?

/

Parameter                  Type Required Description
index numéro Oui L’index du numéro de téléphone à sélectionner.
[key: string] chaîne | numéro | booléen | non défini Non Données facultatives collectées auprès de l’utilisateur.

Classe d’écran Indicatifs de pays MFA

La classe d’écran Indicatifs de pays MFA permet aux utilisateurs de sélectionner un indicatif de pays pour la vérification MFA par numéro de téléphone.

Importez et instanciez la classe d’écran Indicatifs de pays MFA

import MfaCountryCodes from '@auth0/auth0-acul-js/mfa-country-codes';
const mfaCountryCodesManager = new MfaCountryCodes();

// SDK Properties return a string, number or boolean
// ex. "login-id"
mfaCountryCodesManager.screen.name;

// SDK Methods return an object or array
// ex. { signup: "/signup_url", reset_password: "/reset_password_url"} 
await mfaCountryCodesManager.selectCountryCode({
 action: 'selection-action::US1'
});

Was this helpful?

/

Propriétés

Propriétés de la classe d’écran Indicatifs de pays MFA :

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?

/

Méthodes

Propriétés de la classe d’écran Indicatifs de pays MFA :

goBack( options ?)

Cette méthode renvoie l’utilisateur à l’écran précédent.

import MfaCountryCodes from '@auth0/auth0-acul-js/mfa-country-codes';

const mfaCountryCodes = new MfaCountryCodes();
await mfaCountryCodes.goBack();

Was this helpful?

/

Parameter                  Type Required Description
[key: string] string | number | boolean | undefined No Optional data collected to user.

selectCountryCode( options ?)

Cette méthode permet à l’utilisateur de sélectionner un indicatif de pays.

import MfaCountryCodes from '@auth0/auth0-acul-js/mfa-country-codes';

const mfaCountryCodes = new MfaCountryCodes();

// Get the available country codes and phone prefixes
const { screen } = mfaCountryCodes;
const { phone_prefixes } = screen.data
const {country_code, phone_prefix} = phone_prefixes[0]

await mfaCountryCodes.selectCountryCode({
  country_code: 'US',
  phone_prefix: '+1',
});

Was this helpful?

/

Parameter                  Type Required Description
country_code chaîne Oui Indicatif pays à sélectionner.
phone_prefix chaîne Oui Préfixe téléphonique à sélectionner.
[key: string] chaîne | nombre | booléen | non défini Non Données facultatives collectées auprès de l’utilisateur.