how to refresh idToken in Cognito
var refreshToken = localStorage.getItem("refreshToken");
var token = new AmazonCognitoIdentity.CognitoRefreshToken({ RefreshToken: refreshToken })
cognitoUser.refreshSession(token, function (err, session) {
console.log(err, session);
var idToken = session.getIdToken().getJwtToken();
})