Open hrmoller opened 6 years ago
I thought that it would be a separate operation to restore users' passwords from a separate db, or reset their password. And i thought sending a mail to the users when restored would usually not be very nice. But yea i guess there are different use cases. Sure, we can make these things configurable.
This is the exact functionality I need, is there any movement on this?
I was able to get this working: https://github.com/DrCord/cognito-backup-restoration-enhancements My user pools all required the email instead of the username directly. Since I needed to be able to install these changes directly via npm to use immediately my repo had have a few changes you may not want to bring in... If you take a look and want these changes I can make a proper branch and PR for them.
I just did a rewrite to ESM and async/await so the code is a bit easier to work with now. If anyone wants to submit a PR for any of these features I'm happy to merge
I have a few suggestions for the process of user restoration as, at least as I see it, the current implementation is a bit hard to scale:
tempPassword
is a bit inappropriate, as it gives all users the same temporary password. Following the docs ifTemporaryPassword
is not provided Cognito will generate one for you and send it to the user on the given email if MessageAction is not set toSUPPRESS
MessageAction
should be optional. If set toRESEND
Cognito will automatically send a temporary password to the given email address.I guess the best way to allow the above would be to extend the current cli a bit so more options are dynamic rather that hardcoded.