-
Notifications
You must be signed in to change notification settings - Fork 318
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: signout bug when offline #6061
Conversation
|
c378277
to
5051b6e
Compare
Bump. Been using this myself and it has addressed the sign-out bug we were previously experiencing. |
Bump - would love to see this fix go in as it is affecting all of our users |
@dehli Thanks for opening this, fix looks straightforward. Will give it a full review in the next day or so |
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.
@dehli LGTM, just left a small suggestion. Thanks for cleaning up the typos
Thanks for feedback, @calebpollman! Added it as a follow-up commit. Let me know if you'd like me to squash them. |
Thanks for addressing the feedback, no need to worry abt squashing - we'll handle that on our end |
See #6367 for passing e2e tests |
Description of changes
If you call
Auth.fetchAuthSession({ forceRefresh: true })
while offline and using theAuthenticator
, amplify-ui will trigger the logout flow. This fixes that bug.Issue #6057, if available
Description of how you validated changes
Added a test and used
patch-package
.This is the related
amplify-js
code:https://github.com/aws-amplify/amplify-js/blob/0f5091780046b9556b98300c29fb970a0358bd70/packages/auth/src/providers/cognito/tokenProvider/TokenOrchestrator.ts#L173-L176
Checklist
yarn test
passes and tests are updated/added (when running locally they seem to run infinitely but I did add a test)docs
,e2e
,examples
, or other private packages.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.