aws-amplify / amplify-android

The fastest and easiest way to use AWS from your Android app.
https://docs.amplify.aws/lib/q/platform/android/
Apache License 2.0
250 stars 117 forks source link

SignIn flow hangs for consecutive custom challenges. #2459

Closed uliluckas closed 1 year ago

uliluckas commented 1 year ago

Before opening, please confirm:

Language and Async Model

Kotlin, Kotlin - Coroutines

Amplify Categories

Authentication

Gradle script dependencies

```groovy implementation("com.amplifyframework:core-kotlin:2.8.4") implementation("com.amplifyframework:aws-auth-cognito:2.8.4") ```

Environment information

``` ------------------------------------------------------------ Gradle 8.0 ------------------------------------------------------------ Build time: 2023-02-13 13:15:21 UTC Revision: 62ab9b7c7f884426cf79fbedcf07658b2dbe9e97 Kotlin: 1.8.10 Groovy: 3.0.13 Ant: Apache Ant(TM) version 1.10.11 compiled on July 10 2021 JVM: 20.0.1 (Homebrew 20.0.1) OS: Mac OS X 13.4 aarch64 ```

Please include any relevant guides or documentation you're referencing

No response

Describe the bug

My CUSTOM_AUTH flow lambdas require two custom challenges in succession. So I implemented the following flow:

  1. (suspend) Amplify.Auth.signIn() => expected & actual: result.nextStep.signInStep == AuthSignInStep.CONFIRM_SIGN_IN_WITH_CUSTOM_CHALLENGE

  2. (suspend) Amplify.Auth.confirmSignIn() => expected: result.nextStep.signInStep == AuthSignInStep.CONFIRM_SIGN_IN_WITH_CUSTOM_CHALLENGE => actual: confirmSignIn call hangs and never returns at all

  3. (suspend)Amplify.Auth.confirmSignIn() => expected: result.isSignedIn == true => actual: this call is never reached.

The same issue happens with the Java (callback based) APIs. In that case, none of the call backs of confirmSignIn is called in step(2). The same flow works as expected with the Amplify Swift SDK.

Reproduction steps (if applicable)

No response

Code Snippet

// Put your code below this line.

Log output

``` 2023-05-23 16:17:55.758 30029-30116 amplify:aw...AuthPlugin de.test.abc.debug V Auth State Change: NotConfigured(id=) 2023-05-23 16:17:55.762 30029-30117 amplify:aw...AuthPlugin de.test.abc.debug V Auth State Change: ConfiguringAuth(id=) 2023-05-23 16:17:55.764 30029-30115 amplify:aw...AuthPlugin de.test.abc.debug V InitAuthConfig Starting execution 2023-05-23 16:17:55.766 30029-30123 amplify:aw...AuthPlugin de.test.abc.debug V Credential Store State Change: MigratingLegacyStore(id=) 2023-05-23 16:17:55.767 30029-30115 amplify:aw...AuthPlugin de.test.abc.debug V Credential Store State Change: NotConfigured(id=) 2023-05-23 16:17:55.767 30029-30115 amplify:aw...AuthPlugin de.test.abc.debug V MigrateLegacyCredentials Starting execution 2023-05-23 16:17:55.831 30029-30115 amplify:aw...AuthPlugin de.test.abc.debug V MigrateLegacyCredentials Sending event LoadCredentialStore 2023-05-23 16:17:55.832 30029-30123 amplify:aw...AuthPlugin de.test.abc.debug V Credential Store State Change: LoadingStoredCredentials(id=) 2023-05-23 16:17:55.832 30029-30115 amplify:aw...AuthPlugin de.test.abc.debug V LoadCredentialStore Starting execution 2023-05-23 16:17:55.985 30029-30115 amplify:aw...AuthPlugin de.test.abc.debug V LoadCredentialStore Sending event CompletedOperation 2023-05-23 16:17:55.985 30029-30123 amplify:aw...AuthPlugin de.test.abc.debug V Credential Store State Change: Success(storedCredentials=com.amplifyframework.statemachine.codegen.data.AmplifyCredential$Empty@ab5027) 2023-05-23 16:17:55.986 30029-30115 amplify:aw...AuthPlugin de.test.abc.debug V MoveToIdleState Starting execution 2023-05-23 16:17:55.986 30029-30115 amplify:aw...AuthPlugin de.test.abc.debug V MoveToIdleState Sending event MoveToIdleState 2023-05-23 16:17:55.986 30029-30123 amplify:aw...AuthPlugin de.test.abc.debug V Credential Store State Change: Idle(id=) 2023-05-23 16:17:55.986 30029-30115 amplify:aw...AuthPlugin de.test.abc.debug V InitAuthConfig Sending event ConfigureAuthentication 2023-05-23 16:17:55.986 30029-30117 amplify:aw...AuthPlugin de.test.abc.debug V Auth State Change: ConfiguringAuthentication(authNState=NotConfigured(id=)) 2023-05-23 16:17:55.987 30029-30115 amplify:aw...AuthPlugin de.test.abc.debug V InitAuthNConfig Starting execution 2023-05-23 16:17:55.987 30029-30115 amplify:aw...AuthPlugin de.test.abc.debug V InitAuthNConfig Sending event Configure 2023-05-23 16:17:55.987 30029-30117 amplify:aw...AuthPlugin de.test.abc.debug V Auth State Change: ConfiguringAuthentication(authNState=Configured(id=)) 2023-05-23 16:17:55.987 30029-30115 amplify:aw...AuthPlugin de.test.abc.debug V ConfigureAuthN Starting execution 2023-05-23 16:17:55.988 30029-30115 amplify:aw...AuthPlugin de.test.abc.debug V ConfigureAuthN Sending event InitializedSignedOut 2023-05-23 16:17:55.988 30029-30115 amplify:aw...AuthPlugin de.test.abc.debug V ConfigureAuthN Sending event ConfiguredAuthentication 2023-05-23 16:17:55.988 30029-30117 amplify:aw...AuthPlugin de.test.abc.debug V Auth State Change: ConfiguringAuthentication(authNState=SignedOut(signedOutData=SignedOutData(lastKnownUsername=null, hostedUIErrorData=null, globalSignOutErrorData=null, revokeTokenErrorData=null))) 2023-05-23 16:17:55.988 30029-30117 amplify:aw...AuthPlugin de.test.abc.debug V Auth State Change: ConfiguringAuthorization(authNState=SignedOut(signedOutData=SignedOutData(lastKnownUsername=null, hostedUIErrorData=null, globalSignOutErrorData=null, revokeTokenErrorData=null)), authZState=NotConfigured(id=)) 2023-05-23 16:17:55.988 30029-30115 amplify:aw...AuthPlugin de.test.abc.debug V InitAuthZConfig Starting execution 2023-05-23 16:17:55.988 30029-30115 amplify:aw...AuthPlugin de.test.abc.debug V InitAuthZConfig Sending event Configure 2023-05-23 16:17:55.989 30029-30117 amplify:aw...AuthPlugin de.test.abc.debug V Auth State Change: ConfiguringAuthorization(authNState=SignedOut(signedOutData=SignedOutData(lastKnownUsername=null, hostedUIErrorData=null, globalSignOutErrorData=null, revokeTokenErrorData=null)), authZState=Configured(id=)) 2023-05-23 16:17:55.989 30029-30115 amplify:aw...AuthPlugin de.test.abc.debug V ConfigureAuthZ Starting execution 2023-05-23 16:17:55.989 30029-30115 amplify:aw...AuthPlugin de.test.abc.debug V ConfigureAuthZ Sending event ConfiguredAuthorization 2023-05-23 16:17:55.989 30029-30117 amplify:aw...AuthPlugin de.test.abc.debug V Auth State Change: Configured(authNState=SignedOut(signedOutData=SignedOutData(lastKnownUsername=null, hostedUIErrorData=null, globalSignOutErrorData=null, revokeTokenErrorData=null)), authZState=Configured(id=)) 2023-05-23 16:17:56.257 30029-30117 amplify:aw...AuthPlugin de.test.abc.debug V Auth State Change: Configured(authNState=SignedOut(signedOutData=SignedOutData(lastKnownUsername=null, hostedUIErrorData=null, globalSignOutErrorData=null, revokeTokenErrorData=null)), authZState=FetchingUnAuthSession(fetchAuthSessionState=NotStarted(id=))) 2023-05-23 16:17:56.258 30029-30116 amplify:aw...AuthPlugin de.test.abc.debug V InitFetchUnAuthSession Starting execution 2023-05-23 16:17:56.259 30029-30116 amplify:aw...AuthPlugin de.test.abc.debug V InitFetchUnAuthSession Sending event ThrowError 2023-05-23 16:17:56.259 30029-30117 amplify:aw...AuthPlugin de.test.abc.debug V Auth State Change: Configured(authNState=SignedOut(signedOutData=SignedOutData(lastKnownUsername=null, hostedUIErrorData=null, globalSignOutErrorData=null, revokeTokenErrorData=null)), authZState=Error(exception=SessionError(exception=ConfigurationException{message=Identity Pool not configured., cause=null, recoverySuggestion=Please check amplifyconfiguration.json file.}, amplifyCredential=com.amplifyframework.statemachine.codegen.data.AmplifyCredential$Empty@ab5027))) 2023-05-23 16:18:08.335 30029-30117 amplify:aw...AuthPlugin de.test.abc.debug V Auth State Change: Configured(authNState=SigningOut(signOutState=NotStarted(id=)), authZState=SigningOut(amplifyCredential=com.amplifyframework.statemachine.codegen.data.AmplifyCredential$Empty@ab5027)) 2023-05-23 16:18:08.336 30029-30116 amplify:aw...AuthPlugin de.test.abc.debug V InitSignOut Starting execution 2023-05-23 16:18:08.336 30029-30116 amplify:aw...AuthPlugin de.test.abc.debug V InitSignOut Sending event SignOutLocally 2023-05-23 16:18:08.337 30029-30117 amplify:aw...AuthPlugin de.test.abc.debug V Auth State Change: Configured(authNState=SigningOut(signOutState=SigningOutLocally(signedInData=null)), authZState=StoringCredentials(amplifyCredential=com.amplifyframework.statemachine.codegen.data.AmplifyCredential$Empty@ab5027)) 2023-05-23 16:18:08.337 30029-30115 amplify:aw...AuthPlugin de.test.abc.debug V LocalSignOut Starting execution 2023-05-23 16:18:08.337 30029-30115 amplify:aw...AuthPlugin de.test.abc.debug V LocalSignOut Sending event SignedOutSuccess 2023-05-23 16:18:08.337 30029-30115 amplify:aw...AuthPlugin de.test.abc.debug V PersistCredentials Starting execution 2023-05-23 16:18:08.338 30029-30117 amplify:aw...AuthPlugin de.test.abc.debug V Auth State Change: Configured(authNState=SignedOut(signedOutData=SignedOutData(lastKnownUsername=null, hostedUIErrorData=null, globalSignOutErrorData=null, revokeTokenErrorData=null)), authZState=StoringCredentials(amplifyCredential=com.amplifyframework.statemachine.codegen.data.AmplifyCredential$Empty@ab5027)) 2023-05-23 16:18:08.339 30029-30115 amplify:aw...AuthPlugin de.test.abc.debug V Credential Store State Change: Idle(id=) 2023-05-23 16:18:08.339 30029-30123 amplify:aw...AuthPlugin de.test.abc.debug V Credential Store State Change: StoringCredentials(id=) 2023-05-23 16:18:08.339 30029-30115 amplify:aw...AuthPlugin de.test.abc.debug V StoreCredentials Starting execution 2023-05-23 16:18:08.363 30029-30115 amplify:aw...AuthPlugin de.test.abc.debug V StoreCredentials Sending event CompletedOperation 2023-05-23 16:18:08.364 30029-30123 amplify:aw...AuthPlugin de.test.abc.debug V Credential Store State Change: Success(storedCredentials=com.amplifyframework.statemachine.codegen.data.AmplifyCredential$Empty@ab5027) 2023-05-23 16:18:08.364 30029-30115 amplify:aw...AuthPlugin de.test.abc.debug V MoveToIdleState Starting execution 2023-05-23 16:18:08.364 30029-30115 amplify:aw...AuthPlugin de.test.abc.debug V MoveToIdleState Sending event MoveToIdleState 2023-05-23 16:18:08.364 30029-30123 amplify:aw...AuthPlugin de.test.abc.debug V Credential Store State Change: Idle(id=) 2023-05-23 16:18:08.365 30029-30115 amplify:aw...AuthPlugin de.test.abc.debug V PersistCredentials Sending event ReceivedCachedCredentials 2023-05-23 16:18:08.365 30029-30117 amplify:aw...AuthPlugin de.test.abc.debug V Auth State Change: Configured(authNState=SignedOut(signedOutData=SignedOutData(lastKnownUsername=null, hostedUIErrorData=null, globalSignOutErrorData=null, revokeTokenErrorData=null)), authZState=Configured(id=)) 2023-05-23 16:18:08.384 30029-30117 amplify:aw...AuthPlugin de.test.abc.debug V Auth State Change: Configured(authNState=SigningIn(signInState=NotStarted(id=)), authZState=SigningIn(id=)) 2023-05-23 16:18:08.385 30029-30116 amplify:aw...AuthPlugin de.test.abc.debug V InitiateSignInAction Starting execution 2023-05-23 16:18:08.385 30029-30116 amplify:aw...AuthPlugin de.test.abc.debug V InitiateSignInAction Sending event InitiateSignInWithCustom 2023-05-23 16:18:08.386 30029-30117 amplify:aw...AuthPlugin de.test.abc.debug V Auth State Change: Configured(authNState=SigningIn(signInState=SigningInWithCustom(customSignInState=NotStarted(id=))), authZState=SigningIn(id=)) 2023-05-23 16:18:08.386 30029-30116 amplify:aw...AuthPlugin de.test.abc.debug V StartCustomAuth Starting execution 2023-05-23 16:18:08.386 30029-30116 amplify:aw...AuthPlugin de.test.abc.debug V StartCustomAuth Sending event InitiateCustomSignIn 2023-05-23 16:18:08.388 30029-30117 amplify:aw...AuthPlugin de.test.abc.debug V Auth State Change: Configured(authNState=SigningIn(signInState=SigningInWithCustom(customSignInState=Initiating(id=))), authZState=SigningIn(id=)) 2023-05-23 16:18:08.388 30029-30116 amplify:aw...AuthPlugin de.test.abc.debug V InitCustomAuth Starting execution 2023-05-23 16:18:08.389 30029-30116 amplify:aw...AuthPlugin de.test.abc.debug V Credential Store State Change: Idle(id=) 2023-05-23 16:18:08.389 30029-30123 amplify:aw...AuthPlugin de.test.abc.debug V Credential Store State Change: LoadingStoredCredentials(id=) 2023-05-23 16:18:08.389 30029-30116 amplify:aw...AuthPlugin de.test.abc.debug V LoadCredentialStore Starting execution 2023-05-23 16:18:08.390 30029-30116 amplify:aw...AuthPlugin de.test.abc.debug V LoadCredentialStore Sending event CompletedOperation 2023-05-23 16:18:08.390 30029-30123 amplify:aw...AuthPlugin de.test.abc.debug V Credential Store State Change: Success(storedCredentials=ASFDevice(id=null)) 2023-05-23 16:18:08.390 30029-30116 amplify:aw...AuthPlugin de.test.abc.debug V MoveToIdleState Starting execution 2023-05-23 16:18:08.390 30029-30116 amplify:aw...AuthPlugin de.test.abc.debug V MoveToIdleState Sending event MoveToIdleState 2023-05-23 16:18:08.391 30029-30123 amplify:aw...AuthPlugin de.test.abc.debug V Credential Store State Change: Idle(id=) 2023-05-23 16:18:08.391 30029-30116 amplify:aw...AuthPlugin de.test.abc.debug V Credential Store State Change: Idle(id=) 2023-05-23 16:18:08.391 30029-30123 amplify:aw...AuthPlugin de.test.abc.debug V Credential Store State Change: StoringCredentials(id=) 2023-05-23 16:18:08.392 30029-30116 amplify:aw...AuthPlugin de.test.abc.debug V StoreCredentials Starting execution 2023-05-23 16:18:08.398 30029-30116 amplify:aw...AuthPlugin de.test.abc.debug V StoreCredentials Sending event CompletedOperation 2023-05-23 16:18:08.398 30029-30123 amplify:aw...AuthPlugin de.test.abc.debug V Credential Store State Change: Success(storedCredentials=ASFDevice(id=98b62bd0-52c3-40c4-b0e9-6460fbf2d88f:1684851488391)) 2023-05-23 16:18:08.398 30029-30116 amplify:aw...AuthPlugin de.test.abc.debug V MoveToIdleState Starting execution 2023-05-23 16:18:08.398 30029-30116 amplify:aw...AuthPlugin de.test.abc.debug V MoveToIdleState Sending event MoveToIdleState 2023-05-23 16:18:08.399 30029-30123 amplify:aw...AuthPlugin de.test.abc.debug V Credential Store State Change: Idle(id=) 2023-05-23 16:18:08.403 30029-30116 amplify:aw...AuthPlugin de.test.abc.debug V Credential Store State Change: Idle(id=) 2023-05-23 16:18:08.403 30029-30123 amplify:aw...AuthPlugin de.test.abc.debug V Credential Store State Change: LoadingStoredCredentials(id=) 2023-05-23 16:18:08.404 30029-30116 amplify:aw...AuthPlugin de.test.abc.debug V LoadCredentialStore Starting execution 2023-05-23 16:18:08.405 30029-30116 amplify:aw...AuthPlugin de.test.abc.debug V LoadCredentialStore Sending event CompletedOperation 2023-05-23 16:18:08.406 30029-30123 amplify:aw...AuthPlugin de.test.abc.debug V Credential Store State Change: Success(storedCredentials=DeviceData(deviceMetadata=com.amplifyframework.statemachine.codegen.data.DeviceMetadata$Empty@19c1260)) 2023-05-23 16:18:08.406 30029-30116 amplify:aw...AuthPlugin de.test.abc.debug V MoveToIdleState Starting execution 2023-05-23 16:18:08.406 30029-30116 amplify:aw...AuthPlugin de.test.abc.debug V MoveToIdleState Sending event MoveToIdleState 2023-05-23 16:18:08.406 30029-30123 amplify:aw...AuthPlugin de.test.abc.debug V Credential Store State Change: Idle(id=) 2023-05-23 16:18:09.194 30029-30115 amplify:aw...AuthPlugin de.test.abc.debug V InitCustomAuth Sending event ReceivedChallenge 2023-05-23 16:18:09.196 30029-30117 amplify:aw...AuthPlugin de.test.abc.debug V Auth State Change: Configured(authNState=SigningIn(signInState=ResolvingChallenge(challengeState=NotStarted(id=))), authZState=SigningIn(id=)) 2023-05-23 16:18:09.196 30029-30115 amplify:aw...AuthPlugin de.test.abc.debug V InitResolveChallenge Starting execution 2023-05-23 16:18:09.197 30029-30115 amplify:aw...AuthPlugin de.test.abc.debug V InitResolveChallenge Sending event WaitForAnswer 2023-05-23 16:18:09.198 30029-30117 amplify:aw...AuthPlugin de.test.abc.debug V Auth State Change: Configured(authNState=SigningIn(signInState=ResolvingChallenge(challengeState=WaitingForAnswer(challenge=AuthChallenge(challengeName=CUSTOM_CHALLENGE, username=luckas, session=AYABeNCxcRSLa8P5DDB_nBy-qTQAHQABAAdTZXJ2aWNlABBDb2duaXRvVXNlclBvb2xzAAEAB2F3cy1rbXMATmFybjphd3M6a21zOmV1LWNlbnRyYWwtMTo1OTA0OTA4MDk4NTg6a2V5LzRkMmU1YTdmLTFjZDctNDljOS04ZmFjLTJkOWRjYjVjZWY5ZgC4AQIBAHiT0WsoETjA-_W2EH-EQMS-0VLOgD9a5TwyMTIsaW4GEgFTrc0MN-CSg_gi6jXdxo35AAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMWmEQ1oPoBYkoQGMaAgEQgDtuQsxCHNp68ScXrAhaoZkppCKqcZBOc0xL_zxBi0_GYJh4aaaBy9AKnm71cr5fqPpqHh69tlQk-kJqvgIAAAAADAAAEAAAAAAAAAAAAAAAAAB6dYpDOU67B_qoTogOoAl4_____wAAAAEAAAAAAAAAAAAAAAEAAAETCacoPJ2cVEwNoE7-XJMYB7Pmg5TZf6AQkiAi-E9wsBxpPGGFVxz2y_3BzSv0TgkKKGTxSTraFZOtdIw1kVf1sg3FaJa1n1oP0dJBbI9hEWSKWm6YDltm8v4WwII4RYtaYWrZzdXTs8m1DohXvmZV7xwk12uVkmeCXPpQdQPgsT09NcCVJbV8K1sxLfe24kWPvlVnlTTH6acsWF6fnLm0oTUd4ebUKhBZK-9xhVMjEqR8aB_a2NXVUg3KU39RjMuflX8-HjE0SViyCtz1Seh0H6OiOtHFWQ-ym2Nu3z_iXg3k-5hWyD6kK_L6OD-01TAl8X3J4QzDd15GqeN5__x6pOsaEMJjaQH51QIs510l0tGCglGPqDdVnag0-0SkfNdppNE0, parameters={stringToSign=device_string_to_sign, challenge=DEVICE_SIGNING, USERNAME=luckas})))), authZState=SigningIn(id=)) 2023-05-23 16:18:09.312 30029-30117 amplify:aw...AuthPlugin de.test.abc.debug V Auth State Change: Configured(authNState=SigningIn(signInState=ResolvingChallenge(challengeState=Verifying(id=CUSTOM_CHALLENGE))), authZState=SigningIn(id=)) 2023-05-23 16:18:09.313 30029-30330 amplify:aw...AuthPlugin de.test.abc.debug V VerifySignInChallenge Starting execution 2023-05-23 16:18:09.314 30029-30123 amplify:aw...AuthPlugin de.test.abc.debug V Credential Store State Change: LoadingStoredCredentials(id=) 2023-05-23 16:18:09.314 30029-30330 amplify:aw...AuthPlugin de.test.abc.debug V Credential Store State Change: Idle(id=) 2023-05-23 16:18:09.314 30029-30115 amplify:aw...AuthPlugin de.test.abc.debug V LoadCredentialStore Starting execution 2023-05-23 16:18:09.319 30029-30115 amplify:aw...AuthPlugin de.test.abc.debug V LoadCredentialStore Sending event CompletedOperation 2023-05-23 16:18:09.320 30029-30123 amplify:aw...AuthPlugin de.test.abc.debug V Credential Store State Change: Success(storedCredentials=ASFDevice(id=98b62bd0-52c3-40c4-b0e9-6460fbf2d88f:1684851488391)) 2023-05-23 16:18:09.320 30029-30115 amplify:aw...AuthPlugin de.test.abc.debug V MoveToIdleState Starting execution 2023-05-23 16:18:09.320 30029-30115 amplify:aw...AuthPlugin de.test.abc.debug V MoveToIdleState Sending event MoveToIdleState 2023-05-23 16:18:09.320 30029-30123 amplify:aw...AuthPlugin de.test.abc.debug V Credential Store State Change: Idle(id=) 2023-05-23 16:18:09.640 30029-30115 amplify:aw...AuthPlugin de.test.abc.debug V VerifySignInChallenge Sending event ReceivedChallenge 2023-05-23 16:18:09.643 30029-30115 amplify:aw...AuthPlugin de.test.abc.debug V InitResolveChallenge Starting execution 2023-05-23 16:18:09.643 30029-30115 amplify:aw...AuthPlugin de.test.abc.debug V InitResolveChallenge Sending event WaitForAnswer ```

amplifyconfiguration.json

No response

GraphQL Schema

```graphql // Put your schema below this line ```

Additional information and screenshots

No response

uliluckas commented 1 year ago

Consecutive custom challenges seem to work in v1 of the Amplify sdk. Is it advisable to downgrade to v1 at this time? Is v1 considered to be more stabel in general?

tylerjroach commented 1 year ago

Hi @uliluckas, v1 is not considered more stable than v2.

Can you enable logging and post the logs here?

To do this, please add Amplify.addPlugin(AndroidLoggingPlugin(LogLevel.VERBOSE)) before any other plugins in your configure block.

uliluckas commented 1 year ago

Added logs to the original bug report.

uliluckas commented 1 year ago

Hi tylerjroac,

v1 is not considered more stable than v2.

Is there any advise against using v1 in production?

Thanks for your support Uli

tylerjroach commented 1 year ago

@uliluckas No, v1 is still acceptable to use in production. Thank you adding the logs. We will attempt to replicate the bug on our end.

relict007 commented 1 year ago

We are also affected by this issue which doesn't allow users to retry in case of a wrong sms OTP (custom challenge in our case). I think its same as #2352

gpanshu commented 1 year ago

Hello @uliluckas from your logs it shows that it does appear to work as designed. I have also setup my own lambdas to trigger OTPs and that worked as designed as well. Perhaps check your error block to see what error message may have been returned when you do confirmSignIn ?

@relict007 do you see an exception when you retry your OTP?

relict007 commented 1 year ago

@gpanshu, no there is no exception, in case of wrong OTP the call to confirmSignIn never completes. With correct value it works and function returns. Things work with Amplify v1 correctly.

gpanshu commented 1 year ago

@relict007 what version of amplify are you using? Also highly recommend that you add some logging in your lambdas to understand what is sent back to your app. That could help you and us debug the situation further

relict007 commented 1 year ago

@gpanshu Last we tried with 2.8.4. All of our custom auth lambdas have detailed logging and we verified the call sequences (define/create/verify etc) and their responses in this scenario. Things seem to be fine there. If you want I can collect the app/backend logs and update here.

gpanshu commented 1 year ago

@relict007 can you connect with us on Discord to help perhaps setup a call?

relict007 commented 1 year ago

@gpanshu Sorry, I don't have a Discord account.We can have a call though on Jitsi if it works for you.

gpanshu commented 1 year ago

@relict007 you can use this link to setup a call with me : https://prelude.amazon.com/s/fGcxGW9Ab/eEltv

gpanshu commented 1 year ago

This is actually a duplicate of #2352 please follow there for updates.

github-actions[bot] commented 1 year ago

⚠️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.