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

Code Auth - getCodeQueryParameter(httpRequestResponse) #29

Closed vtuhtan closed 6 years ago

vtuhtan commented 6 years ago

I have an issue with Code Auth method. While parsing response it can't establish a session, it constantly requests a new code.

I receive a code in format: domain/page?code=

From the Code it splits the url using the following regex: /#(.+)/ which cannot extract code value because it is not after poundsign, it's after questionmark.

coakeson commented 6 years ago

I am having the same issue with the 1.0.0 version from npm.

modmac commented 6 years ago

https://github.com/aws/amazon-cognito-auth-js/pull/32 fixes that

yuntuowang commented 6 years ago

Now you can use npm to install the latest 1.1.0 version which fixed the issue. Thanks!