-
Notifications
You must be signed in to change notification settings - Fork 119
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
Amplify Android "CONFIRM_SIGN_IN_WITH_CUSTOM_CHALLENGE" not handled by Amplify/AWSCognitoAuthPlugin #805
Comments
Thanks @AntoEko . Will have a member of the Android team reproduce this. |
What's going on with this issue? I ended up by implementing it by myself (still with rxJava2, but should be almost the same with rxJava3). But I would expect it already in the new lib :/
And then I use it like this:
|
Same issue here. At the moment I handle this via |
Strictly speaking, I don't think Amplify Auth supports this right now. As @edgar-zigis notes, you can use this functionality through Amplify Auth's escape hatch,
Update: oh, duh. Didn't see @JurajBegovac's excellent workaround, mentioned above. +1 to it. |
Yes I'm already using AWSMobileClient but it could be better if Amplify handle this one correctly too... :) |
Hi, any update on this issue? :( |
So, custom authentication just doesn't work at all on android? And, since amplify-android is a dependency for amplify-flutter, that means that custom auth doesn't work in amplify-flutter either. Yet there is not one word of this in the amplify documentation, and this issue has been sitting here for six months without any movement at all. Just one more unpleasant surprise waiting for developers who make the unfortunate choice of migrating to Cognito and Amplify and naively expecting that this is a viable solution. If only I could go back in time. |
@jcowley: That's not correct. Did you try the workaround suggested above? |
I'm working on it now, but it is correct: custom authentication is not supported by this library. |
@jamesonwilliams You're welcome. @bostaginting Why 👎 on my comment? Without any valid reason from your side besides "Any update?". I would like to see your solution and use it if it's better than mine ✌️ @jcowley Yeah I'm also not sooo happy because I had to do it by myself but there is a solution posted above. You can always adapt it (use it without rx if you want - it's just the code inside the wrapper). But we use it in production and it works fine 🙂 |
^ This is correct, but this is not:
Note that Amplify is distinct from Cognito. If you want to make arbitrary calls to Cognito to support advanced use cases, please use the Cognito client: |
@JurajBegovac: Yes, appreciate your solution. It's just something I would have expected to either be implemented by the library or documented as a known limitation (including by the dependent aws libraries). |
If I'm not wrong, with the last Amplify updates, we can now handle CUSTOM_AUTH through Amplify directly. |
Hi @edgar-zigis, @jamesonwilliams, @AntoEko, Can you tell me more details about how you got it working? Using AWSMobileClient does not work for either. I'm using a CUSTOM_CHALLENGE sign in state, which is not handled in AWSMobileClient. Here is the code from the sdk. As you can see, it's missing that specific case from the switch. Thanks!
|
@AntoEko Yes that is correct. With this PR merged in, confirm sign-in with custom challenge now works with Amplify. Closing this issue. If you are still experiencing this issue, please let us know. |
Describe the bug
The
confirmSignIn
method doesn't handle theCONFIRM_SIGN_IN_WITH_CUSTOM_CHALLENGE
. It used to be possible with theAWSMobileClient
, but it seems it's not possible anymore through Amplify.To Reproduce
Steps to reproduce the behavior:
signIn(...)
method with theCUSTOM_AUTH
flow in youramplify-configuration.json
fileconfirmSignIn(...)
with (for example) the code received by SMS. You will have an error:confirmSignIn called on unsupported operation, please file a feature request
Look at the switch in the
confirmSignIn(...)
method:Expected behavior
The
confirmSignIn(...)
method through Amplify /AWSCognitoAuthPlugin
should be able to handle the case ofCONFIRM_SIGN_IN_WITH_CUSTOM_CHALLENGE
.Additional context
If I try directly to use
AWSMobileClient
, there is no problem.The text was updated successfully, but these errors were encountered: