Mfa
Constructor Parameters
options
Objectoptions.server
string Server address https://api.mpin.iooptions.customerId
string Customer IDoptions.seed
string Hex encoded random number generator seedoptions.userStorage
Object Storage for saving user dataoptions.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 userclientId
string The OIDC client IDredirectURI
string The OIDC redirect URIcallback
function (Error, Object)
register
Create an identity for the specified user ID
Parameters
userId
string The ID of the userregistrationCode
string The code received from the verification processpinCallback
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 processcallback
function (Error, Object)
authenticate
Authenticate the user with the specified user ID
Parameters
userId
string The ID of the useruserPin
string The PIN of the identitycallback
function (Error, Object)
fetchOTP
Fetch an OTP for the specified user ID
Parameters
userId
string The ID of the useruserPin
string The PIN of the identitycallback
function (Error, Object)
fetchRegistrationCode
Fetch a registration QuickCode for the specified user ID
Parameters
userId
string The ID of the useruserPin
string The PIN of the identitycallback
function (Error, Object)
Users
User management utility. Initialized by Mfa
Constructor Parameters
storage
ObjectcustomerId
stringstorageKey
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 useruserProperty
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