dev-xauth-client
Version:
Authenticate with Biometrics
29 lines (21 loc) • 586 B
Markdown
xAuth-Client
`npm install --save dev-xauth-client`
or with yarn
`yarn add dev-xauth-client`
npm
```js
var xAuth = require('dev-xauth-client');
// create a new instance of the xAuth "class"
var xauth = new xAuth();
// init with api and secret
xauth.init('api', 'secret');
// pass the users id to enable two-factor and returns Qr-Code to register the device
xauth.enableXAuth(clientId).then((response) => {
qr = response.data.qr-code;
})
// sending auth request to mobile
xauth.twoFactorRequest(userId);
```