So far I have managed to login to cognito and syncing data but am stuck at signing out users. Am able to logout from identity providers but upon login again to cognito I get an error for invalid logins. When I reload the app though it works.
An issue has been created for this. The current workaround is to clear the cached id in your Cognito Credentials object, and then to re-initialize it:
cognitoCredentials.clearCachedId();
cognitoCredentials = new AWS.CognitoIdentityCredentials(cognitoParams);
AWS.config.credentials = cognitoCredentials;
Where cognitoParams is the object used to initialize the credentials, eg.:
cognitoParams = {
IdentityPoolId: 'us-east-1:ebee2fff-acde-4382-a090-5990604a007d'
};
After logging out from the identity providers, try calling clearCachedId() on the CognitoIdentityCredentials provider. It should look something like:
AWS.config.credentials.clearCachedId();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With