MIRACL Trust MFA JS

Mfa

Constructor Parameters

  • options Object
    • options.server string Server address https://api.mpin.io
    • options.customerId string Customer ID
    • options.seed string Hex encoded random number generator seed
    • options.userStorage Object Storage for saving user data
    • options.deviceName string Name of Device

setAccessId

Set the access(session) ID

Parameters

  • accessId string

verify

Start the default verification process for a specific user ID

Parameters

  • userId string The ID of the user
  • clientId string The OIDC client ID
  • redirectURI string The OIDC redirect URI
  • callback function (Error, Object)

register

Create an identity for the specified user ID

Parameters

  • userId string The ID of the user
  • registrationCode string The code received from the verification process
  • pinCallback function(function(int)) Called when the PIN code needs to be entered. The provided function argument needs to be called with the PIN to continue the process
  • callback function (Error, Object)

authenticate

Authenticate the user with the specified user ID

Parameters

  • userId string The ID of the user
  • userPin string The PIN of the identity
  • callback function (Error, Object)

fetchOTP

Fetch an OTP for the specified user ID

Parameters

  • userId string The ID of the user
  • userPin string The PIN of the identity
  • callback function (Error, Object)

fetchRegistrationCode

Fetch a registration QuickCode for the specified user ID

Parameters

  • userId string The ID of the user
  • userPin string The PIN of the identity
  • callback function (Error, Object)

Users

User management utility. Initialized by Mfa

Constructor Parameters

  • storage Object
  • customerId string
  • storageKey string

exists

Check if an user with the specified user ID exists

Parameters

  • userId string The ID of the user

Returns boolean

get

Get a property of the user

Parameters

  • userId string The ID of the user
  • userProperty string The name of the property to be fetched

Returns string The value of the user property or undefined if it doesn’t exist

list

List all identities

Returns Object

remove

Remove an identity

Parameters

  • userId string The ID of the user