[英]Unable to get updated attributes and their values from cognito with aws-amplify
Unable to get current attributes and their values from Cognito无法从 Cognito 获取当前属性及其值
Here is the complete flow of what I did这是我所做的完整流程
after searching a lot I found the answer.经过大量搜索,我找到了答案。 there is something called bypass cache.有一种叫做绕过缓存的东西。 this is how we can use it这就是我们可以使用它的方式
import { Auth } from 'aws-amplify';
Auth.currentAuthenticatedUser({
bypassCache: false // Optional, By default is false. If set to true, this call will send a request to Cognito to get the latest user data
}).then(user => console.log(user))
.catch(err => console.log(err));
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.