Skip to content
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

release(required): fix fetchAuthSession may hang on OAuth cancel #12817

Merged
merged 2 commits into from
Jan 10, 2024

Conversation

HuiSF
Copy link
Contributor

@HuiSF HuiSF commented Jan 9, 2024

Description of changes

Bug: cognitoUserPoolsTokenProvider.setWaitForInflightOAuth sets a function that creates and returns a new promise every time.

Correction: The function sets by cognitoUserPoolsTokenProvider.setWaitForInflightOAuth should return the same promise.

Issue #, if available

#12814

Description of how you validated changes

  • Unit tests (updated the unit tests to verify the correction)
  • Next.js sample app - redirect to provider hosted UI, closing the tab, reopening the web app, fetchAuthSession should resolve.

Checklist

  • PR description included
  • yarn test passes
  • Tests are changed or added
  • Relevant documentation is changed or added (and PR referenced)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@HuiSF HuiSF requested a review from a team as a code owner January 9, 2024 00:28
cshfang
cshfang previously approved these changes Jan 9, 2024
jimblanc
jimblanc previously approved these changes Jan 9, 2024
Copy link
Contributor

@jimblanc jimblanc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

cwomack
cwomack previously approved these changes Jan 9, 2024
@HuiSF HuiSF dismissed stale reviews from cwomack, jimblanc, and cshfang via 4bc6f02 January 9, 2024 18:23
@HuiSF HuiSF requested a review from a team as a code owner January 9, 2024 18:23
jimblanc
jimblanc previously approved these changes Jan 9, 2024
@HuiSF HuiSF changed the title fix(auth): setWaitForInflightOAuth wrongly sets new promise release(required): fix fetchAuthSession may hang on OAuth cancel Jan 9, 2024
cshfang
cshfang previously approved these changes Jan 9, 2024
@HuiSF HuiSF dismissed stale reviews from cshfang and jimblanc via c8c3a9f January 10, 2024 00:13
@HuiSF HuiSF force-pushed the hui/fix/auth/oauth-new-promise branch from 4bc6f02 to c8c3a9f Compare January 10, 2024 00:13
@HuiSF HuiSF merged commit 2a2d290 into release Jan 10, 2024
28 checks passed
@HuiSF HuiSF deleted the hui/fix/auth/oauth-new-promise branch January 10, 2024 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants