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
Sign in callback invoked before all sign in operations are complete #1700
Comments
PR for the fix - #1721 |
So would this be why using Any ETA on when this will be fixed? |
No ETA yet but we are actively working on it. |
PR #1721 approved and pushed to develop branch. |
Had to revert the PR since we found another callback which was invoked before signIn completes. This is caused by |
This should be solved in the PR #1822. |
We released this in https://github.com/aws-amplify/aws-sdk-ios/releases/2.11.0 Please let us know if you have any problems with this. |
This issue has been automatically closed because of inactivity. Please open a new issue if are still encountering problems. |
Describe the bug
Callback for sign is called before the actual status is set internally.
To Reproduce
We call self.performUserPoolSuccessfulSignInTasks and then calls completionHandler without waiting for the first task to complete.
https://github.com/aws-amplify/aws-sdk-ios/blob/master/AWSAuthSDK/Sources/AWSMobileClient/AWSMobileClient.swift#L480
i) Inside self.performUserPoolSuccessfulSignInTasks we call ‘mobileClientStatusChanged’
ii) After that we remove keychain values and update with new ones
iii) After that we call the two lines below
self.internalCredentialsProvider?.clearCredentials()
self.internalCredentialsProvider?.credentials()
This means that if we rely on AWSMobileClient.sharedInstance().addUserStateListener, and perform task based on the status. It will be wrong.
The text was updated successfully, but these errors were encountered: