📜  如何在 Cognito 中刷新 idToken - 任何代码示例

📅  最后修改于: 2022-03-11 14:55:49.133000             🧑  作者: Mango

代码示例1
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();
})