/** @type {PasswordResetPostChallengeAction} * This sample action redirects the user to an example app * and then continues the action after the redirect to challenge * the user with an MFA factor */module.exports.onExecutePostChallenge = async (event, api) => { // Send the user to https://my-app.example.com api.redirect.sendUserTo('https://my-app.example.com');};module.exports.onContinuePostChallenge = async (event, api) => { const enrolledFactors = event.user.enrolledFactors.map((x) => ({ type: x.type })); // Challenge the user with email otp OR another enrolled factor api.authentication.challengeWith({ type: 'email' }, { additionalFactors: enrolledFactors }); // Example of how to challenge the user with multiple options // in this case email otp OR sms otp // api.authentication.challengeWithAny([{ type: 'email' }, { type: 'sms' }]);};