amazon-cognito-auth-js icon indicating copy to clipboard operation
amazon-cognito-auth-js copied to clipboard

CognitoAuth.getCurrentUser returns undefined in the Implicit grant flow

Open watchwithdao opened this issue 7 years ago • 2 comments

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?

watchwithdao avatar Mar 23 '18 23:03 watchwithdao

Hi @dnguyen219, we noticed this issue. I will push the fix very soon! Thanks!

yuntuowang avatar Mar 27 '18 19:03 yuntuowang

Hi @dnguyen219, we have published the fix. Please use v1.1.5 and try!

yuntuowang avatar Mar 27 '18 20:03 yuntuowang