Okta access token is getting doubled in cookie

I am using Okta-Auth.js version 4.9.2 and Okta-react.js version 5.1.2 in my react (v16) based application. We storing okta-id token and okta access token in browser cookie.

So there is scenario in code like if user keeping their system idle for some certain time period, we closing OKTA session auth.closeSession().

Now issue is, When user visiting multiple pages and keeping his system idle for sometime and it reached inactiveSessionTime limit and then clicking on any functionality, I am getting bad request because of header reaching size limit. so to resolve this i saw client log and found that in access token which we storing in cookie, a “value” key with same value as accesstoken is getting appended with accesstoken and same with idToken and hence doubling the size of cookie.

please help me out.

Are you using the tokenManager to store your tokens? Do you see the same behavior when using our React Sample?