Closed robdubparker closed 1 month ago
Hello @robdubparker. The default authentication session expiry time is 3 minutes. You can increase it up to 15 minutes.
edit
button on the App client information
sectionAuthentication flow session duration
Hello, @robdubparker 👋. To add to what @israx said, the temporary password is only valid to be used once. More than likely, this is tied to the auth flow session duration mentioned above though.
Thanks for the quick responses to this. I think my issue was more tied to the temp password being valid only once. After that the user is sort of locked in a FORCE_PASSWORD_RESET state that can't be changed. The user needs to be deleted and re-created in this case. I wasn't sure if this was intentional or not. If intentional, no problem, I think I have some ideas if it becomes an issue. I'm hoping it's a scenario that won't happen very often, if at all.
@robdubparker, wanted to circle back on this issue to point to a couple others in the repo that are capturing this "gap" in the user experience with Cognito's password reset flows. We have #9844 for the inability to indicate when a temp password has expired as well as #11270 detailing the "deadlocked" state that users can get into.
Since this issue is describing expected behavior that the temporary passwords can only be used once, we'll close this issue out. However, encourage you to upvote/comment/add context to the other issues above to help them gain traction. Thanks!
Before opening, please confirm:
JavaScript Framework
React Native
Amplify APIs
Authentication
Amplify Version
v6
Amplify Categories
auth
Backend
None
Environment information
Describe the bug
If the CONFIRM_SIGN_IN_WITH_NEW_PASSWORD_REQUIRED session expires (which can happen for a handful of reasons), the users' temp password no longer works and a "NotAuthorizedException" error is thrown for any future attempts. The newly created user is now locked out of ever being able to login via aws-amplify/auth library. Reset password functionality does not work in this case either. The only way around this seems to be to delete the user and recreate them within the AWS Amplify console.
Expected behavior
User should be allowed to login and set their new password using the temp password provided during user creation.
Reproduction steps
nextStep.signInStep = 'CONFIRM_SIGN_IN_WITH_NEW_PASSWORD_REQUIRED'
.confirmSignIn
function.confirmSignIn
function, we hit our issue.Code Snippet
Log output
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
No response