-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Many redundant requests, even though properly caching #671
Comments
I also facing this issue too, sometimes it sends to Cognito 6 times with the same request |
Same issue here, every time I switch tab and go back, Amplify is sending exactly 2 requests |
@MatteoGioioso these two requests are sent as the session event for the Pinpoint Analytics. If you do not want the auto tracking feature, you can turn it off in your Analytics configuration: https://aws-amplify.github.io/docs/js/analytics#manual-setup |
@powerful23 Thank you! |
Looks like this is solved per the above feature. Please feel free to reopen if you are still having issues with the auto tracking disablement. |
This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs. Looking for a help forum? We recommend joining the Amplify Community Discord server |
Do you want to request a feature or report a bug?
I think this is a bug. Or a misunderstanding on my part.
I checked here https://docs.aws.amazon.com/cognito/latest/developerguide/limits.html and didn't see any specific rate limits for the GetCredentialsForIdentity, but wanted to make sure before I invested too much time into this.
What is the current behavior?
On every page load, even though I can see my token, identity id, expires at date in my local storage I get at least two requests to https://cognito-identity.us-west-2.amazonaws.com/ AWSCognitoIdentityService.GetCredentialsForIdentity
I'm wondering if this a bug since everything is cached and the expires_at date has not passed yet.
We've had rate limiting issues with Cognito in the past when we mistakenly sent a request to Cognito on every page load. I assumed that switching to AWS-Amplify would remove these HTTP posts.
Is the GetCredentialsForIdentity function rate limited?
You can see my current implementation in this PR #665
What is the expected behavior?
I expected that I would see a request to https://cognito-identity.us-west-2.amazonaws.com/ only once every 5 minutes, not on every page refresh.
The text was updated successfully, but these errors were encountered: