I need to reset some users' passwords but not send forgot password emails. Just reset the password so that the next time they log in I can display a message that they need to request a password reset. Drilling down the most basic thing I need: without informing the user, I need to get them into a RESET_REQUIRED status so that getting the user on the frontend returns a PasswordResetRequiredException.
I originally thought AdminSetUserPassword would work for this, but it puts the user in a state where they need to change their password via some UI that I don't have set up. I'm not sure if there is an extra step I can take there -- set the password with AdminSetUserPassword and then maybe take some other steps?
Otherwise, I've tried a bunch of different things around AdminResetUserPassword.
- Tried removing any custom message from the Lambda I have that runs on the
CustomMessage_ForgotPasswordtrigger, but that just causes a generic message with code to send. - Tried changing the
email_verifiedattribute for the user tofalse(because the AWS docs state that it will send a password reset email IF they have a verified email), but that makes the password reset itself raise an error. - Tried changing the user's email to a temporary (fake) one so the email would get sent there, but the user receives an email when their email is changed.
Does anyone have any experience with this, or is this an impossible request?