confirmSignUp does not return a response when called after 'signIn' returns with 'CONFIRM_SIGN_UP' status #13876
Labels
Auth
Related to Auth components/category
pending-maintainer-response
Issue is pending a response from the Amplify team.
pending-triage
Issue is pending triage
Before opening, please confirm:
JavaScript Framework
React Native
Amplify APIs
Authentication
Amplify Version
v6
Amplify Categories
auth
Backend
Amplify CLI
Environment information
Describe the bug
I have a screen where a user can sign up or sign in to my application. The users username is their email. After the user signs up, or if the user signs in and the 'nextStep.signInStep' value is 'CONFIRM_SIGN_UP', the user is redirected to a screen where they can enter a confirmation code. This screen calls 'confirmSignUp' with the users email and the confirmation code; the only difference is, if called after 'signUp' it also calls 'autoSignIn' and if called after 'signIn' it does not.
My code for the logic of the confirmation of the signup is as follows:
I am getting a weird issue however; if I call 'confirmSignUp' after a user has signed up
(user signs up -> verification code screen)
everything works fine, and the response logs as expected; but when I call sign in and I am returned a 'CONFIRM_SIGN_UP' next step(signUp -> verification code screen -> swipe up and out of application -> restart application -> signIn with credentials -> get 'CONFIRM_SIGN_UP' status from signIn -> verification code screen -> confirmSignUp)
there seems to be no response;console.log("Sign up after sign in complete: ", response);
is not logged, and nothing after 'await confirmSignUp' happens; however, if I use an incorrect code, I do get a log saying it is a '{"name":"CodeMismatchException"}' error. Additionally, the confirmation does seem to happen if the 'confirmSignUp' function is run with the correct code, as the user will show up as verified in the Cognito user pool in the aws console. I do not understand why the confirmSignUp does not seem to return anything or blocks the rest of my code if it is called with the correct verification code however.Expected behavior
The
confirmSignUp
function should run properly and I should get a response fromconfirmSignUp
of typeconfirmSignUpOutput
.Reproduction steps
signUp
function, do not verify withconfirmSignUp
, then attempt to sign in and verify user after 'CONFIRM_SIGN_UP' is returned.Code Snippet
// Put your code below this line.
Log output
aws-exports.js
Manual configuration
No response
Additional configuration
No response
Mobile Device
iPhone 15
Mobile Operating System
iOS 17.4
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
No response
The text was updated successfully, but these errors were encountered: