amplify-android
amplify-android copied to clipboard
Amplify.Auth.signUp returns 'isSignUpComplete = true' when signUpStep is 'CONFIRM_SIGN_UP_STEP'
When calling Amplify.Auth.signUp(...)
, the response includes a nextStep.signUpStep
value of CONFIRM_SIGN_UP_STEP
, while at the same time an isSignUpComplete
value of true
.
My expectation is that the isSignUpComplete
value should only be true
if signUpStep
is DONE
.
This code is being called from the Android platform code of a Flutter plugin, but I do not expect that this would make a difference.
Hey, this is intended behavior. You are successfully signed up at this point - it's just that there is an additional step you can take of confirming your account which is needed to sign in.
Hey, this is intended behavior. You are successfully signed up at this point - it's just that there is an additional step you can take of confirming your account which is needed to sign in.
This is exactly the opposite of my recollection: I thought we interpreted that flag as a convenience to mean "there are no remaining steps." In our discussions, we even talked about implementing it in iOS as a computed property returning the results of nextStep == .done
. The semantic meaning was "the flow is done; my expectation of a successful 'sign up' is that a user can now sign in."
I believe the reason we digressed from if nextStep == null then done
here is because you are indeed completely signed up after the success callback comes back. If you got isSignedUp = false
and then tried to sign up again, it would give you an error, "User is already signed up"
which is contradictory.
The fact that there are additional next steps you can take (not necessary for completing sign up but necessary for being able to sign in) doesn't change the fact that you are signed up at that point.
got this as well. went through the amplify tutorial for flutter, but used the latest amplify version, so it enterd this issue. It works with:
if (result.isSignUpComplete) {
if (result.nextStep is AuthNextSignUpStep) {
//enter verify flow
}
// signup was ok. do login
loginWithCredentials(credentials);
}
Re-opening the issue, as per discussion we decided to fix this in Android. Since this is a breaking change, we might add this in the next major version update. Here are the different scenarios:
// SignUp needs to confirm using SMS
nextStep -> .confirmUser(SMS)
isSignupComplete -> false
// SignUp needs to confirm, but not email/SMS provided
nextStep -> .confirmUser(nil)
isSignupComplete -> false
// SignUp confirmed
nextStep -> .done
isSignupComplete -> false
Hello @haverchuck we have addressed and fixed this in the V2 version of Amplify library for Android. If upgrading is an option for you please try that out.
⚠️COMMENT VISIBILITY WARNING⚠️
Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.