-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
confirmSignUp does not return a response when called after 'signIn' returns with 'CONFIRM_SIGN_UP' status #13876
Comments
Hello, @abduaddis1 👋 and thanks for opening this issue. Just to confirm, the As for the issue with |
Hi @cwomack , so there is a condition to check if the user called |
@abduaddis1, thank you for the follow up reply here. I think I've got a better understanding of the issue now based on the documentation referencing the use of Basically, the authentication flows should look like the following:
Can you confirm if following the above flows (or making any changes to your code to align with them) results in this still? Edit to add a related issue where a documentation update/fix was identified surrounding some of these Auth flows and API's - #13666 |
Closing this issue as we have not heard back from you. If you are still experiencing this, please feel free to reply back and provide any information previously requested and we'd be happy to re-open the issue. Thank you! |
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: