amplify-js: React Native Auth SignIn: Double Clicking SignIn crashes with Error: Pending sign-in attempt already in progress
Describe the bug
In the react native Auth library the SignIn component does not have a pending state and the Sign In button can be tapped again before the request completes. This leads to an exception that crashes the app.
To Reproduce
Wrap your app with the useAuthenticator or drop the <Authenticator /> component anywhere and double click sign in after filling out fields with anything.
Expected behavior Sign In button is disabled (and loading indicator is displayed)
Code Snippet
Screenshots

About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 4
- Comments: 17 (3 by maintainers)
Commits related to this issue
- fix(@aws-amplify/aws-amplify-react-native): disable sign in button while awaiting sign in request (#7763) — committed to calebpollman/amplify-js by calebpollman 3 years ago
- fix(@aws-amplify/aws-amplify-react-native): disable sign in button while awaiting sign in request (#7763) — committed to calebpollman/amplify-js by calebpollman 3 years ago
- fix(@aws-amplify/aws-amplify-react-native): disable sign in button while awaiting sign in request (#7763) — committed to calebpollman/amplify-js by calebpollman 3 years ago
Fix can be tested by installing
aws-amplify@unstable, will be included in the next prod release@rraczae I’m able to reproduce this consistently if I try to double-click very quickly. I’m certain this would be more consistent on a slower connection though. I’ve labeled it as a bug for the UI team to look into. Thank you!