Closed israx closed 2 months ago
Based on the information provided, it appears you're experiencing an issue with the sign-in process using AWS Amplify v6 in a React Native application. However, some crucial details are missing that would help in providing a more accurate solution. To better understand and address your issue, I would need answers to the following questions:
Can you provide more details about the specific scenario when the CONFIRM_SIGN_IN_WITH_NEW_PASSWORD_REQUIRED session expires? For example, how long does it typically take for this to occur?
Are you using the default Cognito User Pool settings, or have you customized any settings related to temporary passwords or session duration?
Can you share the relevant code snippet where you're handling the sign-in process and the CONFIRM_SIGN_IN_WITH_NEW_PASSWORD_REQUIRED state?
Have you observed any specific error messages in your application logs when this issue occurs?
These details will help in identifying the root cause of the problem and suggesting an appropriate solution or workaround.
I was able to solve the issue.
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