Angular 放大/认知:更新用户属性后刷新会话变量(角度)

Angular 放大/认知:更新用户属性后刷新会话变量(角度),angular,variables,session,amazon-cognito,Angular,Variables,Session,Amazon Cognito,用于更新属性的My函数: updateUserInfo(user, attributes) { Auth.updateUserAttributes(user, attributes) .then( result => { console.log(result); // SUCCESS } ) .catch( error => { console.log(error); }

用于更新属性的My函数:

updateUserInfo(user, attributes) {

  Auth.updateUserAttributes(user, attributes)
    .then(
      result => {
        console.log(result); // SUCCESS
      }
    )
    .catch(
      error => {
        console.log(error);
      }
    );
}
结果是
SUCCESS
,在我的AWS Cognito服务中,在特定用户的页面上,我可以看到属性已经更改。因此,更新在Cognito中运行良好

但是当我在调用这个更新函数之后刷新angular应用程序的页面时,旧属性仍然存在,而不是新属性。因此,我认为需要刷新当前用户会话变量才能获得新属性,如何做到这一点


注意:我不明白的是,在显示用户属性的angular应用程序页面上,我向Amazon发出了获取用户属性的GET请求。因此,如果在获取这些信息之前已经完成了更新,为什么我仍然要获取旧属性?

当前的解决方案是在
Auth.currentAuthenticatedUser()之后调用
Auth.currentAuthenticatedUser({bypassCache:true})
当前的解决方案是调用
Auth.currentAuthenticatedUser()({bypassCache:true})
Auth.updateUserAttributes()之后