Closed JakubWijata closed 2 years ago
@JakubWijata
Amplify.Auth.signIn
API?@JakubWijata
- Are you using Cognito Hosted UI, or logging users in via the
Amplify.Auth.signIn
API?- Do you know if any of your users may have cleared their keychains? @haverchuck
@haverchuck Do you have any information or potential causes?
Hi @JakubWijata - unfortunately, without logs or reproduction code, it's gonna be very difficult to say for sure. With that being said, I thought of a couple more questions which could help narrow down the issue:
Hi @JakubWijata - unfortunately, without logs or reproduction code, it's gonna be very difficult to say for sure. With that being said, I thought of a couple more questions which could help narrow down the issue:
- Is this being experienced only by iPhone users because your app is only deployed to iPhones or is it also running on Android devices?
- Do you have any of Cognito's advanced security features enabled?
Thanks for the extra info, @JakubWijata. I will stress again that without logs or reproduction code, it's going to be very difficult to track down a root cause. I'm not aware of any reason why your customers would be experiencing this issue and looking through the iOS and Android GitHub issues provides no additional insights.
That being said, I will try to reproduce the issue with a short refresh token, using the version of Amplify you reported (0.5.0), and let you know what I find.
Thanks for the extra info, @JakubWijata. I will stress again that without logs or reproduction code, it's going to be very difficult to track down a root cause. I'm not aware of any reason why your customers would be experiencing this issue and looking through the iOS and Android GitHub issues provides no additional insights.
That being said, I will try to reproduce the issue with a short refresh token, using the version of Amplify you reported (0.5.0), and let you know what I find.
Do you have any new information?
Sorry for the delay. I don't have any updates at the moment. How soon before 30 days are your users being logged out?
Sorry for the delay. I don't have any updates at the moment. How soon before 30 days are your users being logged out?
it was a few days in a row the same situation. So probably the same day as log-in action.
I also find a user submission from the Android platform so it is platform independent.
Hello @JakubWijata - This issue looks similar to https://github.com/aws-amplify/amplify-flutter/issues/1271 and https://github.com/aws-amplify/amplify-flutter/issues/1438. In both cases production logs indicate that sessions were expiring before the expiration time. Would you be able to take a look at those issues and let me know if you believe the issue that you are experiencing is different than these? If you are experiencing the same issue, I would like to close this out and continue to track this in those issues.
Unfortunately we have been unable to reproduce this behavior. We believe it could be the result of a race condition in Amplify-iOS/Amplify-Android, but without the ability to reproduce it is hard to say for sure. That being said, we are actively working on re-writing the Auth library in Dart. The main goal of this re-write is to enable support for Web & Desktop, but we are also implementing a new design using state machines that is intended to solve issues such as race conditions. We think it is likely that this will resolve these issues. The auth re-write is currently in developer preview. You can read more about the developer preview release in the blog post and docs.
Description
We using amplify_auth_cognito on the flutter mobile app for authorized users. We configured the token for 1h and refreshToken for 30 days. Recently, we received several reports from users who were logged out before the 30 days expired. We also didn't receive any logs or crashes from these situations. Is there any reason that case occurs? It is important for us that the user is not logged out before 30 days.
Categories
Steps to Reproduce
N/A
Screenshots
N/A
Platforms
Android Device/Emulator API Level
No response
Environment
Dependencies
Device
iPhone9, Iphone 9
OS
Version 15.5 (Build 19F77), Version 15.2(Build 19C56)
CLI Version
N/A
Additional Context
No response