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

fix(auth): oAuthStore is used before a valid OAuth config is confirmed #12748

Merged
merged 1 commit into from
Dec 26, 2023

Conversation

HuiSF
Copy link
Member

@HuiSF HuiSF commented Dec 23, 2023

Description of changes

Moved the origin call of cognitoUserPoolsTokenProvider.setWaitForInflightOAuth() in the enableOAuthListener side effect into the attemptCompleteOAuthFlow function.

The latter ensures the oAuthStore gets configured before using.

Issue #, if available

Description of how you validated changes

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 December 23, 2023 03:05
Copy link
Contributor

@kvramyasri7 kvramyasri7 left a comment

Choose a reason for hiding this comment

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

This change looks good to me e2e run seems to pass all the tests. But I have not tested this change in sample app.

Copy link
Contributor

@kvramyasri7 kvramyasri7 left a comment

Choose a reason for hiding this comment

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

I would highly recommend to get a senior engineers approval as well before merging this PR. Just a suggestion 🙂.

@kvramyasri7 kvramyasri7 merged commit ae64386 into main Dec 26, 2023
31 checks passed
AllanZhengYP added a commit to AllanZhengYP/amplify-js that referenced this pull request Dec 26, 2023
AllanZhengYP added a commit that referenced this pull request Dec 26, 2023
* Revert "fix(auth): oAuthStore is used before a valid OAuth config is confirmed (#12748)"

This reverts commit ae64386.

* Revert "feat(auth): standalone enable oauth listener for MPAs (#12731)"

This reverts commit 94d1fb2.
@HuiSF HuiSF deleted the hui/fix/non-guarded-oauthstore-call branch January 22, 2024 17:37
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.

4 participants