-
Notifications
You must be signed in to change notification settings - Fork 880
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
AWSMobileClient confirmSignIn success callback not called #1248
Comments
If we change the code to the above, the success callback starts working.
This callback is shared between |
@alistra Thanks for pointing it out. We will take a look and make necessary changes. It looks like you have it working for now. Please let us know if that is not the case and you are blocked on it. |
@desokroshan it's a blocker for us, as we would like to use the drop-in UI, which there is still no workaround and we would like to not have to implement our own UI solution in our project. The workaround only works for the non-UI login methods |
Hello @alistra This seems more to me like a race condition. The major indication being that once you use the main thread dispatch everything starts working. It might have to do something with the order of the calls. I will investigate and reply back once I identify the root cause. Best, |
We are experiencing the exact same behaviour (AWS iOS SDK Version: 2.9.3). When the user state is |
Hello all, There are 2 issues here mentioned in this thread.
Thanks, |
OK thanks for the update. |
Hello @alistra and @jamesingham I have been investigating this issue and have some findings to share. I wrote an app which does exactly what @alistra has mentioned and found that:
From what I can see, the I will be trying to work on decoupling two callbacks so that invoking Thanks, |
On investigating this further, I identified that the code changes would be more involved and would require plenty of edge cases and race conditions if the APIs are accessed incorrectly. I am going to mark this as an enhancement which we can revisit in the future. But currently, my recommendation would be to use the APIs independently from user interactions rather calling the Could you please confirm if the issue is resolved if handled via separate user interactions? Thanks, |
@rohandubal After decoupling the
It doesn't seem like Many thanks, EDIT: |
Interestingly I have just been using the Android equivalent sdk and that handles this by providing a set new password view. |
@sourabhardwaj We need to pass required attributes (if you have set them) while making confirmSignIn API call. In your case "name" is a required attribute, the code change will be:
I have raised a PR #1672 to support attributes on confirmSignIn method. Thanks, |
Awesome @royjit , much needed change in the SDK. |
PR #1672 is released, which fixes passing user attributes to confirmSignIn.
|
Describe the bug
We use the drop-in UI from Cognito (using
AWSMobileClient.showSignIn
method)We create a new Cognito user, it starts in the
FORCE_CHANGE_PASSWORD
state.We try to log in with the username and temporary password in the drop-in UI.
After tapping the Sign In button nothing happens.
User should be presented with a view controller to change password.
We tried to use the manual sign in methods.
We use
AWSMobileClient.signIn
method. We get and error with.newPasswordRequired
case.We use
AWSMobileClient.confirmSignIn
method to try to confirm change the initial password as per documentation here: https://aws-amplify.github.io/docs/ios/authenticationThis method doesn't return any success callback for us, so we don't have any way of continuing the flow in the app.
The user is marked as confirmed on the Cognito panel.
It appears as the success callback is not called on some code paths.
It seems like those 2 behaviors are caused by the same bug in the missing success callback.
To Reproduce
A code sample or steps:
Which AWS service(s) are affected?
Cognito
Expected behavior
FORCE_CHANGE_STATE
correctly, by presenting a view controller that will allow the user to change the passwordAWSMobileClient.confirmSignIn
method to call the provided callback upon successful confirmation. Currently the confirmation is performed, but the callback is not called.Environment(please complete the following information):
Additional context
We inspected the open source code of
AWSMobileClient
and it doesn't seem that there is any code path present that would call the block upon success. Maybe it's just a copy-paste error?CC @anaglik
The text was updated successfully, but these errors were encountered: