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(core|auth|adapterCore): use createAuthTokenRefresher #13396

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

HuiSF
Copy link
Contributor

@HuiSF HuiSF commented May 17, 2024

Description of changes

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 force-pushed the hui/fix/ssr-deduped-token-refresher branch 5 times, most recently from d05b48f to cbf45ab Compare May 17, 2024 17:55
@HuiSF HuiSF changed the title fix(adapterCore): use new instance of dedupe refresh token function in each request context fix(core|auth|adapterCore): use createAuthTokenRefresher May 17, 2024
@HuiSF HuiSF force-pushed the hui/fix/ssr-deduped-token-refresher branch from cbf45ab to f0f8d8c Compare May 17, 2024 18:05
@HuiSF HuiSF force-pushed the hui/fix/ssr-deduped-token-refresher branch from f0f8d8c to 2de2895 Compare May 17, 2024 18:12
Now we are using the createAuthTokenRefresher for creating new instances of
the deduped token refresher function for different use cases:

1. on client: there is only one instance gets created on app load
2. on server: a new instance gets created in each context that's created by
  runWithAmplifySeverContext function
@HuiSF HuiSF force-pushed the hui/fix/ssr-deduped-token-refresher branch from 2de2895 to dd5cab4 Compare May 17, 2024 18:26
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, thanks!

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

3 participants