amazon-archives / amazon-cognito-auth-js

The Amazon Cognito Auth SDK for JavaScript simplifies adding sign-up, sign-in with user profile functionality to web apps.
Apache License 2.0
423 stars 232 forks source link

The authorization_code method is parsing URL incorrectly and sending blank body and header #31

Closed coakeson closed 6 years ago

coakeson commented 6 years ago

Should be this: CognitoAuth.js:107 "QUERYPARAMETERREGEX1: /\?(.+)/," CognitoAuth.js:507 "for (j in header) {" CognitoAuth.js:510 "for (i in body) {"

Without those changes, the authorization_code method will not work as the body and header are not populated, and the code cannot be parsed out of the URL

modmac commented 6 years ago

PR https://github.com/aws/amazon-cognito-auth-js/pull/32 resolves this issue.