aws / aws-aspnet-cognito-identity-provider

ASP.NET Core Identity Provider for Amazon Cognito
https://aws.amazon.com/developer/language/net/
Apache License 2.0
215 stars 89 forks source link

resend temporary password #125

Closed ghendo closed 5 years ago

ghendo commented 5 years ago

If email confirmation is required and a temporary password has been sent then deleted by the user how can I trigger a new temporary password to be sent

assyadh commented 5 years ago

Hi,

This is documented here:

https://github.com/aws/aws-aspnet-cognito-identity-provider/blob/master/docs/4-User%20Management%20-%20Email%20and%20Phone%20number.md

ghendo commented 5 years ago

the words temporary password do not appear in the link supplied

assyadh commented 5 years ago

Sorry I thought you meant the confirmation token.

I would have to digg deeper to see if this is supported by Cognito (resend the temp password).

You can also just reset the account, it will do the same:

https://github.com/aws/aws-aspnet-cognito-identity-provider/blob/master/docs/5-User%20Management%20-%20Change%20and%20reset%20passwords.md

Would that do the trick?

ghendo commented 5 years ago

I dont think you can reset password if email is unconfirmed

klaytaybai commented 5 years ago

Hi @ghendo, you can do an AdminCreateUserRequest and set the MessageAction to RESEND. https://github.com/aws/aws-sdk-net/blob/966617d346169e89a693dae74c5eec5cda0551b2/sdk/src/Services/CognitoIdentityProvider/Generated/Model/AdminCreateUserRequest.cs#L122-L130.