Reputation: 1481
Unable to get current attributes and their values from Cognito
Here is the complete flow of what I did
Upvotes: 4
Views: 1450
Reputation: 1481
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));
Upvotes: 8