You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Kotlin: 1.5.31
Groovy: 3.0.9
Ant: Apache Ant(TM) version 1.10.11 compiled on July 10 2021
JVM: 11.0.13 (JetBrains s.r.o. 11.0.13+0-b1751.21-8125866)
OS: Windows 10 10.0 amd64
Please include any relevant guides or documentation you're referencing
No response
Describe the bug
My project only uses some simple features of Cognito. The user has a temporary password, so they just use it to sign in and then register their real password.
In code,
Amplify.Auth.signIn(ID, temporary password), and if nextStep.signInStep is "CONFIRM_SIGN_IN_WITH_NEW_PASSWORD", Amplify.Auth.confirmSignIn(new Password).
If you call Amplify.Auth.confirmSignIn() within a few minutes of calling Amplify.Auth.signIn(), the session has not expired and will succeed.
After 5 minutes or so and the session expires, Amplify.Auth.confirmSignIn() throws an error NotAuthorizedException. Up to this point, it is the same as the previous ver 0.21.6.
However, from the new ver2.0.0, even if you call Amplify.Auth.signIn(ID, temporary password) again, without taskkilling the app, the error InvalidStateException below will occur. I signed in again successfully with the old ver 0.21.6.
How can I successfully confirmSignIn or SignIn, other than taskkilling?
Reproduction steps (if applicable)
Call Amplify.Auth.signIn(ID, temporary password).
If nextStep.signInStep is "CONFIRM_SIGN_IN_WITH_NEW_PASSWORD", please wait 3~5 min of default time.
Call Amplify.Auth.confirmSignIn(new Password) and catch error NotAuthorizedException.
So, after Amplify.Auth.signOut() not global, call Amplify.Auth.signIn(ID, temporary password) again.
catch InvalidStateException. This is the same until you taskkill the app.
Code Snippet
// Put your code below this line.
Log output
~call SignOut(local)
2022-11-21 15:40:12.582 Amplify.Auth.signOut D Signed out with Local
~call SignIn()
2022-11-21 15:40:12.582 Amplify.Auth.signIn-st D userId=XXXXX@XXXXXXXX/userPassword=XXXXXXXXXX
2022-11-21 15:40:12.583 Amplify.co...thConfig() D Auth just became signed out.
2022-11-21 15:40:15.630 Amplify.Auth.signIn D isSignedIn=Sign in not complete
2022-11-21 15:40:15.630 Amplify.Auth.signIn D nextStep.signInStep=CONFIRM_SIGN_IN_WITH_NEW_PASSWORD
~wait 5min, and call ComfirmSignIn()
2022-11-21 15:45:31.121 Amplify.Au...firmSignIn D Sign in failed AmplifyException+NotAuthorizedException/ NotAuthorizedException(message=Invalid session for the user, session is expired.)
~call SignOut(local)
2022-11-21 15:45:57.486 Amplify.Auth.signOut D Signed out with Local
~call SignIn() again
2022-11-21 15:45:57.486 Amplify.Auth.signIn-st D userId=XXXXX@XXXXXXXX/userPassword=XXXXXXXXXX
2022-11-21 15:45:57.509 Amplify.Auth.signIn D Sign in failed AmplifyException InvalidStateException{message=Auth state is an invalid state, cannot process the request., cause=null, recoverySuggestion=Operation performed is not a valid operation for the current auth state.}
amplifyconfiguration.json
No response
GraphQL Schema
// Putyourschema below this line
Additional information and screenshots
No response
The text was updated successfully, but these errors were encountered:
I apologize for not being able to reply sooner. This has been fixed and merged in and will be available to you with the next update of Amplify in the upcoming weeks. I will reply here once the update is out to close out the ticket so you do not have to monitor it.
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.
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
My project only uses some simple features of Cognito. The user has a temporary password, so they just use it to sign in and then register their real password.
In code,
Amplify.Auth.signIn(ID, temporary password), and if nextStep.signInStep is "CONFIRM_SIGN_IN_WITH_NEW_PASSWORD", Amplify.Auth.confirmSignIn(new Password).
If you call Amplify.Auth.confirmSignIn() within a few minutes of calling Amplify.Auth.signIn(), the session has not expired and will succeed.
After 5 minutes or so and the session expires, Amplify.Auth.confirmSignIn() throws an error NotAuthorizedException. Up to this point, it is the same as the previous ver 0.21.6.
However, from the new ver2.0.0, even if you call Amplify.Auth.signIn(ID, temporary password) again, without taskkilling the app, the error InvalidStateException below will occur. I signed in again successfully with the old ver 0.21.6.
How can I successfully confirmSignIn or SignIn, other than taskkilling?
Reproduction steps (if applicable)
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: