Package Exports
- mfa-otp
- mfa-otp/dist/index.js
- mfa-otp/dist/index.mjs
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (mfa-otp) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Simple MFA OTP generator
This is a simple OTP (One Time Password) generator that can be used to generate OTPs for two-factor authentication.
Includes CJS, ESM and UMD builds.
Installation
For NPM:
npm install mfa-otpFor Browser: download the package and in dist folder you will find the UMD build index.umd.js.
<script src="./dist/index.umd.js"></script>
<script>
const otp = window.mfaOTP.getOTP({
secretValue: 'SECRET_VALUE',
epochMS: new Date().getTime(), // optional
});
console.log(otp);
</script>