amazon-cognito-auth-js
amazon-cognito-auth-js copied to clipboard
CognitoAuth.getCurrentUser returns undefined in the Implicit grant flow
I am integrating Amazon Cognito with a SAML identity provider which is also the sole identity provider of my app. I am using both Authorization code grant and Implicit grant flows. The allowed OAuth scopes are: aws.cognito.signin.user.admin, openid, profile, and email.
I am also retrieving the current user by calling the getCurrentUser method inside the onSuccess block of the userhandler property. While the getCurrentUser method returns the current username in the Authorization code grant flow, it returns undefined in the Implicit grant flow.
Is this a known issue?
Hi @dnguyen219, we noticed this issue. I will push the fix very soon! Thanks!
Hi @dnguyen219, we have published the fix. Please use v1.1.5 and try!