Tan*_*ick 4 javascript amazon-web-services reactjs amazon-cognito aws-amplify
无法从 Cognito 获取当前属性及其值
这是我所做的完整流程
经过大量搜索后我找到了答案。有一种叫做旁路缓存的东西。这就是我们如何使用它
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));
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1307 次 |
| 最近记录: |