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

Unable to see Enabled status on CognitoUser #110

Closed blaisealicki closed 5 years ago

blaisealicki commented 5 years ago

I'm porting an existing app into Cognito and have a requirement for administrators to be able to enable and disable accounts. I'm looking at the results of GetUsersAsync and it looks like the List Users on the response have the Enabled field, but that isn't carried onto CognitoUser. Is there a way to read and write to the Enabled field that I am missing?

klaytaybai commented 5 years ago

You should be able to do this by using the AdminEnableUser and AdminEnableUser methods on the AmazonCognitoIdentityProviderClient found in AWSSDK.CognitoIdentityProvider.

blaisealicki commented 5 years ago

That works for me, thanks. I would like to see the Enabled property carried over to the CognitoUser and populated by default when calling GetUsersAsync, but I'm able to work around it.

assyadh commented 5 years ago

Hi @blaisealicki, Feel free to submit a PR, I would be happy to review it and get it merged.

H.