cognito-backup icon indicating copy to clipboard operation
cognito-backup copied to clipboard

Restoration improvements

Open hrmoller opened this issue 7 years ago • 4 comments

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:

  • a hardcoded tempPassword is a bit inappropriate, as it gives all users the same temporary password. Following the docs if TemporaryPassword is not provided Cognito will generate one for you and send it to the user on the given email if MessageAction is not set to SUPPRESS
  • value of MessageAction should be optional. If set to RESEND 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.

hrmoller avatar Jun 05 '18 07:06 hrmoller

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.

mifi avatar Jun 05 '18 19:06 mifi

This is the exact functionality I need, is there any movement on this?

DrCord avatar Jun 16 '21 18:06 DrCord

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.

DrCord avatar Jun 16 '21 21:06 DrCord

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

mifi avatar Feb 26 '22 17:02 mifi