-
Notifications
You must be signed in to change notification settings - Fork 2.2k
fix(@aws-amplify/auth): No Auth module registered in Amplify #6811
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(@aws-amplify/auth): No Auth module registered in Amplify #6811
Conversation
Codecov Report
@@ Coverage Diff @@
## main #6811 +/- ##
==========================================
+ Coverage 73.31% 73.35% +0.04%
==========================================
Files 212 212
Lines 13144 13145 +1
Branches 2565 2566 +1
==========================================
+ Hits 9636 9642 +6
+ Misses 3314 3309 -5
Partials 194 194
Continue to review full report at Codecov.
|
sammartinez
left a comment
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.
LGTM 🌮
elorzafe
left a comment
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.
Thanks @ericclemmons ! 🌮 🎉 🥇
|
How can I get this fix? Is this in the latest version if I do an npm install for Amplify |
Correct @jumanahalasadi Please use the latest version for this fix. Do remember to do a |
|
Okay thanks! :) @sammartinez |
…lify#6811) * Add tests for Credentials.Auth * Credentials.Auth is referenced when needed vs. when constructed
* Add tests for Credentials.Auth * Credentials.Auth is referenced when needed vs. when constructed
|
This pull request has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs. Looking for a help forum? We recommend joining the Amplify Community Discord server |
Issue #, if available: Fixes #6750
Introduced by feat(SSR): withSSRContext #6146,
CredentialsreferencedAmplify.Authfor deferring toAuth.currentUserCredentials(), but only whenAuthwas imported/registered.The bug was that
Auth = Amplify.Authonly worked whenAuthwas already imported & registered first, which wasn't always the case.Instead,
this.Authis preferred overAmplify.Authwithin the_keepAlivefunction at run-time, rather than when constructed. This ensures thatthis.Authwins for SSR, butAmplify.Authis always the latest reference.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.