User pool icons are stored in local storage. And when you call getCurrentUser in the user pool object, you can get the last authenticated user object. After that, the getSession call must use the update token to receive new access tokens if they have expired, for example, in the example below. In the callback for getSession, you must have a valid session.
var poolData = { UserPoolId : '...',
source share