📅  最后修改于: 2022-03-11 14:55:49.133000             🧑  作者: Mango
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();
})