showMfa

client.showMfa({
  container: HTMLElement|id,
  accessToken: string,
  showIntro: boolean,
  showRemoveMfaCredentials: boolean
})

Description

Shows the widget which allows you to activate second factors for MFA.

For more on MFA as a whole, see our dedicated Multi-factor Authentication guide.

Examples

const accessToken = // Here paste the authorization token of the profile retrieved after login

client.showMfa({
    container: 'mfa-container',
    accessToken,
    showIntro: true,
    showRemoveMfaCredentials: true,
    onReady: instance => {
      // Destroy the widget
      // if (...) instance.destroy()
    },
    theme: {
      primaryColor: '#274890',
      borderRadius: '#374890'
    }
})

Widget

Here, you can see an example of the widget:

showMfa

Parameters

container HTMLElement id

The DOM element or the id of a DOM element in which the widget should be embedded.

accessToken string

The authorization credential JSON Web Token (JWT) used to access the ReachFive API, less than five minutes old.

showIntro boolean

Show the introduction text.

Defaults to true.

showRemoveMfaCredentials boolean

Boolean to enable (true) or disable (false) whether the option to remove MFA credentials are displayed.