amazon-archives / amazon-cognito-identity-js

Amazon Cognito Identity SDK for JavaScript
Other
984 stars 454 forks source link

userPool.getCurrentUser() is returning null in IE11 where as chrome gives me the user #660

Closed haritharallapalli closed 6 years ago

haritharallapalli commented 6 years ago

Hi,

var poolData = {
    UserPoolId : userPoolId,
    ClientId : poolClientId
}
var userPool = new AWSCognito.CognitoIdentityServiceProvider.CognitoUserPool(poolData);
var cognitoUser = userPool.getCurrentUser();

this is the piece of code where i am trying to check for current user. cognitoUser when i print in console of chrome it is actually giving me valid tokens. But IE is actually giving me null. "cognitoUser:" null

Because of which my app is ruuning on chrome but not working in IE.Can you please let me know what i need to do? Thanks.

haritharallapalli commented 6 years ago

I was able to resolve it. IE is not having local storage when I run from local file.