two-factor
Two factor authentication using totp or hotp. Can also generate dynamic qrcodes for mobile devices.
Basic Usage: TOTP (Time-based One Time Password)
var TwoFactor = ; /** * Generates a base 32 secret key. Each user should have their own stored someplace safe. This is like a users password. * * @type */var secret = TwoFactorgenerate; /** * Code supplied from a token generator such as Google Authenticator * * @type */var code = reqbodycode; // 123456 /** * Check to see if a user supplied code matches their secret * * @type */var isValid = TwoFactor;
QR Codes
The library also can generate qr codes that can be read by mobile applications. The following example shows how to create a svg string that can rendered directly in a page.
/** * Generates a SVG String that can be render in the browser * * @type */var code = authgenerate;