Overview:
After the user receives a Verification Code, the user enters the Verification Code, and the Account Status becomes CONFIRMED. Now that the sign up process is completed, I want to automatically sign in the user in after. It seems inefficient and redundant to redirect the user to the Sign In page to have user enter their information and sign in.
Possible Options:
- Use the
emailandpasswordfrom the sign up process and then dispatch thesignInaction to sign in the user. - Find a way combined method for both
confirmSignUpandsignIn, which would be something along the lines ofconfirmSignUpAndSignIn(If a method exists). I have looked through the AWS Docs and through the issues Amplify-js Github Repo, but have only found that others have had a similar dilemma with no apparent resolution. - Use the AWS Amplify Hub (Auth Listener), but there aren't any events emitted when the user
confirms sign up. It would make sense that
confirmSignUpwould emit an event, but it doesn't. (See Below)
AWS Hub Listener:
I'm using the AWS Amplify Hub (Auth listener) and the only events that are emitted are the following from the docs:
case 'signIn':
logger.error('user signed in'); //[ERROR] My-Logger - user signed in
break;
case 'signUp':
logger.error('user signed up');
break;
case 'signOut':
logger.error('user signed out');
break;
case 'signIn_failure':
logger.error('user sign in failed');
break;
case 'configured':
logger.error('the Auth module is configured');