UNPKG

lets-mfa

Version:

Free, secure, and quick way to add MFA to your existing app. No user migrations or re-architecture needed!

22 lines (21 loc) 765 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.generateEnrollRequest = void 0; const node_crypto_1 = require("node:crypto"); function generateEnrollRequest(realm, publicKey, domain, responseUrl, signedJWT, authPolicy, accountDisplayName, validThrough, accountVault, logoUrl, requestId) { return { realm, authOrEnroll: "enroll", responseUrl, domain, nestedJWT: signedJWT, publicKey, validThrough: validThrough || Date.now() + 5 * 60 * 1000, authPolicy, accountVault, accountDisplayName, logoUrl, requestId: requestId ? requestId : (0, node_crypto_1.randomUUID)(), }; } exports.generateEnrollRequest = generateEnrollRequest;