UNPKG

payload-totp-temp

Version:

Add an extra security layer to PayloadCMS using a Time-based One-time Password (TOTP).

21 lines (20 loc) 581 B
/* eslint-disable no-restricted-exports */ import { jsx as _jsx } from "react/jsx-runtime"; import { toDataURL } from 'qrcode'; import styles from './index.module.css'; export default async function QRCode({ totp }) { const src = await toDataURL(totp.toString(), { color: { dark: '#fff', light: '#00000000' }, margin: 0 }); return /*#__PURE__*/ _jsx("img", { alt: "2FA QR Code", className: styles.root, height: 196, src: src, width: 196 }); } //# sourceMappingURL=index.js.map