I am using AmazonCognitoIdentity in a react app.
Before every call to our backend API we are trying to verify that the token is valid and if not use the refresh token