Closed israx closed 2 months ago
Based on the information provided, it appears that you're experiencing an issue with the authentication process in your React Native application using AWS Amplify v6. However, to better understand and address your problem, I need some additional details:
Can you provide more specific steps to reproduce the issue? For example, at what point in the authentication flow does the session expire?
Are you using the default Cognito User Pool configuration, or have you customized any settings related to password policies or session duration?
Can you share the relevant code snippet where you're handling the CONFIRM_SIGN_IN_WITH_NEW_PASSWORD_REQUIRED challenge?
Have you checked the Cognito User Pool logs in the AWS Console for any error messages related to this issue?
These details will help me provide a more accurate and tailored solution to your problem. The information about session expiration and temp password not working suggests a potential issue with the authentication flow or configuration, but more context is needed to pinpoint the exact cause.
I solved the issue, thanks
Based on the information provided, it appears you're experiencing an issue with the authentication process in a React Native application using AWS Amplify v6. However, to better understand and potentially resolve your issue, I need some additional information:
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 Amplify UI components for authentication, or have you implemented a custom authentication flow?
Can you share the relevant code snippet where you're handling the sign-in process and the new password confirmation?
Have you checked the Cognito User Pool settings in the AWS Console to ensure the password policy and user account expiration settings are configured as expected?
These details will help me better understand your setup and the specific circumstances of the issue, allowing me to provide a more accurate and helpful solution.
I solved the issue. Thanks
Thank you for raising this issue. If you have any questions or if this issue resurfaces, please don't hesitate to reopen it or create a new one.
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