aws-mobile-appsync-sdk-js icon indicating copy to clipboard operation
aws-mobile-appsync-sdk-js copied to clipboard

deepdish:connect errors with token expiry.

Open saeelparsekar-aa opened this issue 2 years ago • 0 comments

Note: If your issue/feature-request/question is regarding the AWS AppSync service, please log it in the official AWS AppSync forum

Bug

We have a app which has its subscriptions through appsync library version ^4.1.9. It has a authentication mechanism set to AWS Lambda. so it basically uses the Access Token from session storage of the web app. We renew the token every 1 hour so basically UI always have the valid token in session storage. However we see a sudden logs in the backend where appsync sends a expired token in a method called deepdish:connect. This token is not the latest one and hence a error is logged as expired token. However after this one fail next request which goes it passes successfully as the expired token is dumped and new token is taken.

We expect that everytime the library internally tris to connect or make a deepdish:connect call, it should use the latest token rather than expired one. We have that available in sessionStorage all the time

saeelparsekar-aa avatar Sep 19 '23 15:09 saeelparsekar-aa