Closed uliluckas closed 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?
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.
Added logs to the original bug report.
Hi tylerjroac,
v1 is not considered more stable than v2.
Is there any advise against using v1 in production?
Thanks for your support Uli
@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.
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
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?
@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.
@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
@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.
@relict007 can you connect with us on Discord to help perhaps setup a call?
@gpanshu Sorry, I don't have a Discord account.We can have a call though on Jitsi if it works for you.
@relict007 you can use this link to setup a call with me : https://prelude.amazon.com/s/fGcxGW9Ab/eEltv
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, 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 CUSTOM_AUTH flow lambdas require two custom challenges in succession. So I implemented the following flow:
(suspend) Amplify.Auth.signIn() => expected & actual: result.nextStep.signInStep == AuthSignInStep.CONFIRM_SIGN_IN_WITH_CUSTOM_CHALLENGE
(suspend) Amplify.Auth.confirmSignIn() => expected: result.nextStep.signInStep == AuthSignInStep.CONFIRM_SIGN_IN_WITH_CUSTOM_CHALLENGE => actual: confirmSignIn call hangs and never returns at all
(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
Log output
amplifyconfiguration.json
No response
GraphQL Schema
Additional information and screenshots
No response