Setting the password using adminSetUserPassword api, can it take tempPassword and NewPassword both in request along with email as currently it is just accepting NewPassword and email

0

module.exports.generateResetPassword = (req, res) => { const { email, newPassword, USER_POOL_ID } = req.body;

const params = { UserPoolId: USER_POOL_ID, Username: email, Password: newPassword, Permanent: true, };

cognitoISP.adminSetUserPassword(params, (err, data) => { if (err) { return res.status(409).json({ error: err.message }); } else { res.status(200).json({ message: 'Password reset successfully' }); } }); };

Dev
asked 7 months ago31 views
No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions