amplify-js icon indicating copy to clipboard operation
amplify-js copied to clipboard

Indicate when Cognito temporary password is expired

Open ghomem opened this issue 1 year ago • 3 comments

Before opening, please confirm:

JavaScript Framework

React Native

Amplify APIs

REST API

Amplify Categories

auth

Environment information

N/A

Describe the bug

I would like to follow up in the status of #1182. I wanted to put a comment there but the issue is locked. We have the same problem as the original poster: some users are in state FORCE_CHANGE_PASSWORD but the password can't be set because the grace period was expired. Intuitively, it seems that there should be a new state to describe this condition or a new field that can be queried to discover whether this is the case or not.

Expected behavior

I would expect to have a way to find if the user password can be set or not (by means of the temporary password). Currently we see FORCE_CHANGE_PASSWORD whether or not the password can be set. When managing anything more than a handful of users this because very confusing in terms of support.

Reproduction steps

  1. Create a user via Cognito API
  2. Check that its state is FORCE_CHANGE_PASSWORD
  3. Let the grace period expire
  4. Check that the user state is still FORCE_CHANGE_PASSWORD
  5. Conclude that you can't distinguish in your list of users which users can and which users can not, define their password

Code Snippet

No response

Log output

// Put your logs below this line
N/A

aws-exports.js

No response

Manual configuration

No response

Additional configuration

No response

Mobile Device

No response

Mobile Operating System

No response

Mobile Browser

No response

Mobile Browser Version

No response

Additional information and screenshots

N/A

ghomem avatar Jul 13 '22 09:07 ghomem

@mlecoq FYI the original issue that you opened is not available anymore. Did you find any solution for this?

ghomem avatar Jul 13 '22 09:07 ghomem

We were in a rush and decided to let users notify us when they couldn't connect - so a manual solution

mlecoq avatar Jul 16 '22 14:07 mlecoq

We were in a rush and decided to let users notify us when they couldn't connect - so a manual solution

Sorry to hear. Thanks for replying @mlecoq .

ghomem avatar Jul 18 '22 07:07 ghomem

hi @ghomem Just verifying, are you looking for a solution through Cognito as the console doesn't show this information? Or did you want Amplify to handle this through the code?

tannerabread avatar Nov 11 '22 19:11 tannerabread

hi @ghomem Just verifying, are you looking for a solution through Cognito as the console doesn't show this information? Or did you want Amplify to handle this through the code?

I would like Cognito to show the information and https://github.com/aws-amplify/amplify-js/issues/1182 was the only reference I could find, so I commented here. I opened a case with Amazon support and they very politely said they would discuss it internally but so far no news. I apologize if I created noise outside of the proper place.

ghomem avatar Nov 11 '22 19:11 ghomem

Not a problem, I was just trying to clarify to see if there was something Amplify should do. I will close this now as it is a Cognito issue but feel free to open a new issue if you encounter problems with Amplify. Also, if Cognito ever gets back to you and adds this functionality to the console, feel free to open a feature-request here so that we can handle it on the frontend.

Thank you!

tannerabread avatar Nov 11 '22 19:11 tannerabread