Closed 24601 closed 3 years ago
PS - Our workaround has gotten even more painful, we are using patch-package to literally replace any instance of handleAuthStateChange(AuthState.VerifyContact, newUser);
in the lib with handleAuthStateChange(AuthState.SignedIn, user);
The state machine that controls this is horribly broken. There is no valid reason at all to transition the state machine into AuthState.VerifyContact when the contact info is totally validated and always has been. Absolutely no exception.
Please fix it so we don't have to keep forking or monkey patching libs to get them to basically work they way they should at 1.0.
Yes, I am frustrated. Amplify and AWS are not free little open source projects. They are marketed as enterprise-grade frameworks and integrations for production-grade AWS services that accelerate development and improve user and developer experience. This is exactly the opposite of both. Especially when it isn't fixed quickly (such a basic defect should never have made it out of unit test, frankly!).
@24601 If you can still reproduce this issue consistently, would you mind console logging the data.payload
from the Hub listener when attempting to login and posting the results here. The main things we are looking for are whether the verifyContact
event is being triggered as well as whether the user data contains verified
or unverified
properties at any point during your login process.
Hey @24601 , I'm sorry you're having this issue and that nobody has addressed it yet. I'm looking into it but I can't reproduce it on my end. If you can log what @chrisbonifacio mentioned above, that might help me debug this a bit better.
This issue has been automatically closed because of inactivity. Please open a new issue if are still encountering problems.
This issue 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 *-help
channels or Discussions for those types of questions.
Before opening, please confirm:
JavaScript Framework
Angular
Amplify APIs
Authentication
Amplify Categories
auth
Environment information
Describe the bug
Occasionally, especially on new browsers/incognito browsers/anonymous browsers where the user has not logged in recently, a brief flash of the 'Account recovery contact verification' screen occurs. It is brief and then the app transitions away, no problem.
But it is there long enough to be very disconcerting to users. We are fielding tons of support requests about this.
See video below (sensitive info redacted, but you will be able to see the quick flash in the middle of the video that is about .5s long, sometimes it is longer, sometimes it doesn't happen).
We have attempted to use both the handleAuthStateChange method and the Hub listener method to detect an auth state change to react to this quickly, and we do act very quickly, but this still occurs (e.g. no long async methods in the state transition, just literally a router.navigate.
We have found that commenting out the line at https://github.com/aws-amplify/amplify-js/blob/df95ea3724eb6406f64b03f25086cd3e8644cb5f/packages/amplify-ui-components/src/common/auth-helpers.ts#L25 avoids this problem, BUT, of course, defeats the whole ability to use contact verification in the UI package, because it never allows a transition into that state. Which is OK for our current use, but that will not fly forever. It seems the logic that transitions the state machine into this state is spurious.
Expected behavior
A normal, successful login for a user with verified info should not flash this information.
Reproduction steps
Login
Code Snippet
We have tried both methods, they yield the same issue.
Hub listener
handleAuthStateChange
// Put your logs below this line
Manual configuration
No response
Additional configuration
No response
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
https://www.dropbox.com/s/fp0aco1fo297ekq/AmplifyUIBug.mp4?dl=0