Skip to content
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

"confirmSignIn called on unsupported operation" when using Custom Challenge (amplify_auth_cognito For Flutter) #276

Closed
bostaginting opened this issue Dec 25, 2020 · 5 comments
Labels
Android Issues specific to the Android Platform auth Issues related to the Auth Category pending-close-response-required The issue will be closed if details necessary to reproduce the issue are not provided within 7 days.

Comments

@bostaginting
Copy link

bostaginting commented Dec 25, 2020

Describe the bug
When we try to call confirmSignIn using CONFIRM_SIGN_IN_WITH_CUSTOM_CHALLENGE, it returns an error stating "AmplifyException {message=Confirm sign in failed, cause=java.lang.IllegalStateException: confirmSignIn called on unsupported operation, please file a feature request, recoverySuggestion=See attached exception for more details}". This only happens in the Android build from the Flutter project and works well with the iOS build.

Expected behavior
After we call confirmSignIn, if the correct (Custom) OTP is used, then user is signed in. Again, this already works with amplify-flutter on iOS.

Screenshots
Screen Shot 2020-12-25 at 17 09 15

Platform

amplify version: 4.26.1-flutter-preview.0
Amplify Flutter supports iOS and Android. This issue is reproducible in:
[Y] Android
[N] iOS

Smartphone :

Device: [AOSP in IA Emulator]
OS: [Android version 9]
Version [Android version 9]

Additional context
I understand Amplify flutter library uses native libraries through channeling in flutter. I found the code that throws this exception here[1]. it looks like login by custom challenge is not implemented.

[1] https://github.com/aws-amplify/aws-sdk-android/blob/c6a24e945253206c84027d87e5bdb8ce3eab3dcf/aws-android-sdk-mobile-client/src/main/java/com/amazonaws/mobile/client/AWSMobileClient.java#L1332

@bostaginting bostaginting changed the title Caused by: java.lang.IllegalStateException: confirmSignIn called on unsupported operation, please file a feature request "confirmSignIn called on unsupported operation" when using Custom Challenge Dec 28, 2020
@haverchuck
Copy link
Contributor

haverchuck commented Dec 29, 2020

aws-amplify/amplify-android#805

@Amplifiyer Amplifiyer added Android Issues specific to the Android Platform auth Issues related to the Auth Category labels Dec 29, 2020
@bostaginting
Copy link
Author

Hi, any solution for this problem? thank you.

@bostaginting bostaginting changed the title "confirmSignIn called on unsupported operation" when using Custom Challenge "confirmSignIn called on unsupported operation" when using Custom Challenge (amplify_auth_cognito For Flutter) Jan 5, 2021
@satyasrikantmantha
Copy link

Hi,

I am also experiencing the same issue with Android whereas with iOS emulators it works well. Any ideas how can we resolve this issue quickly. This is a showstopper for us.

@fjnoyp
Copy link
Contributor

fjnoyp commented Jan 20, 2021

Hi @bostaginting @satyasrikantmantha sorry you've been having issues with this. Our Dart Library is built on top of the native Android/iOS Amplify libraries which is where this issue is originating from. They resolved the issue on native Android by using an escapeHatch (aws-amplify/amplify-android#805). We are looking into adding support for escapeHatch possibly in the future in our Dart library as well

hannesj added a commit to hannesj/amplify-flutter that referenced this issue Jan 26, 2021
Update aws-auth-cognito version for Android. This fixes aws-amplify#271 and aws-amplify#276.
The the custom challenge answer was fixed in aws-amplify/aws-sdk-android#2316. It was released in version v2.21.0 of the AWS Android SDK, which was included in the version 1.6.9 of the Amplify Android SDK.
@offlineprogrammer
Copy link
Contributor

Hi @bostaginting @satyasrikantmantha

With the Android PR merged in, confirm sign-in with custom challenge now works with Amplify.

Feel free to test using the latest build and let us know if you got any issues

Regards
Mo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Android Issues specific to the Android Platform auth Issues related to the Auth Category pending-close-response-required The issue will be closed if details necessary to reproduce the issue are not provided within 7 days.
Projects
None yet
Development

No branches or pull requests

6 participants