It occurs once on function call, and then again in the first if clause if conditions are met.
The second if else changes the logic of xhr, so this seems needless. Removing it solves the error `[Error: Cannot open, already sending]`.
2) Adding a brief comment in the README, as it was not clear to remove the protocol in the AppWebDomain parameter, which was causing https://https:// as the SDK prepends the protocol to the request.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Issue #, if available: https://github.com/aws-amplify/amplify-js/issues/1143
Description of changes: 1) Removing needless
xhr.open
call found here: https://github.com/aws/amazon-cognito-auth-js/blob/1ea0f1d9282201f31411ac87b8a96a244793c1f4/src/CognitoAuth.js#L5712) Adding a brief comment in the README, as it was not clear to remove the protocol in the AppWebDomain parameter, which was causing
https://https://
as the SDK prepends the protocol to the request.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.