-
Notifications
You must be signed in to change notification settings - Fork 121
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
Auth state is an invalid state after multi-step custom challenge failed (InvalidStateException) #2754
Comments
@jab11 Thank you for your report, we will take a look into the issue |
Hi @jab11, thank you for your patience, could you check if this issue persist with the latest version of Amplify? |
This issue is now closed. Comments on closed issues are hard for our team to see. |
I believe this issue has been fixed in the latest version of Amplify. Please let us know if the issue persists after upgrading. |
This issue is now closed. Comments on closed issues are hard for our team to see. |
Before opening, please confirm:
Language and Async Model
Kotlin - Coroutines
Amplify Categories
Authentication
Gradle script dependencies
Environment information
Please include any relevant guides or documentation you're referencing
No response
Describe the bug
Our app uses a multistep custom challenge, so after signin there's captcha and sms code.
The app gets correct response after captcha:
Auth State Change: Configured(authNState=SigningIn(signInState=ResolvingChallenge(challengeState=WaitingForAnswer(challenge=AuthChallenge(challengeName=CUSTOM_CHALLENGE, username=..., session=..., parameters={challengeType=SMS, phone=...}), hasNewResponse=true))), authZState=SigningIn(id=))
Correct sms challenge works correctly, wrong challenge gets not authorized response, but anything after that returns an
InvalidStateException
Calling
resendSignUpCode
,signOut
or anotherconfirmSignIn
all return InvalidStateException.Auth State Change: Configured(authNState=SigningIn(signInState=ResolvingChallenge(challengeState=Error(exception=NotAuthorizedException(message=Invalid session for the user.), challenge=AuthChallenge(challengeName=CUSTOM_CHALLENGE, username=..., session=..., parameters={challengeType=SMS, phone=...}), hasNewResponse=true))), authZState=SigningIn(id=))
There doesn't seem to be any way to reset auth state or reinitialize the auth plugin other than killing the app.
What is the solution for this state ?
Reproduction steps (if applicable)
InvalidStateException
Code Snippet
// Put your code below this line.
Log output
amplifyconfiguration.json
No response
GraphQL Schema
Additional information and screenshots
No response
The text was updated successfully, but these errors were encountered: