-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(auth): Fix for retry sign in when resourceNotFoundException is raised #2605
fix(auth): Fix for retry sign in when resourceNotFoundException is raised #2605
Conversation
8645266
to
7683608
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
approving because the code looks the way I would expect code that fixes this issue to look and because the tests look like they properly test the feature. not huge due diligence here, I'm not an auth expert
Codecov Report
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. @@ Coverage Diff @@
## main #2605 +/- ##
==========================================
- Coverage 41.76% 41.73% -0.03%
==========================================
Files 900 900
Lines 28814 28852 +38
Branches 4093 4098 +5
==========================================
+ Hits 12033 12041 +8
- Misses 15463 15488 +25
- Partials 1318 1323 +5 |
"After signing in and calling rememberDevice(), calling forgetDevice(id) on another device or manually forgetting the device via Cognito leads to the device being unable to sign in." Can you clarify this? Is the user unable to sign in again after a sign out? Or does this impact their signed in user. Does this behavior now match Swift exactly? |
|
Issue #, if available: #2603
Description of changes: Reported via JS team. After signing in and calling rememberDevice(), calling forgetDevice(id) on another device or manually forgetting the device via Cognito leads to the device being unable to sign in. The issue is that the original device still has the deviceMetadata and deviceId and provides it to Cognito, which no longer recognizes it as valid. The error we get back from Cognito is ResourceNotFoundException{message=Could not find the requested online resource., cause=ResourceNotFoundException(message=Device does not exist.)}. Swift/Flutter apparently have retries in place to catch this and resubmit without the device metadata.
How did you test these changes?
Manually and integration tested
Documentation update required?
General Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.