# React SPA - Auto refresh not working after calling renew from React

**URL:** <https://devforum.okta.com/t/react-spa-auto-refresh-not-working-after-calling-renew-from-react/18846>\
**Category:** Questions\
**Tags:** react\
**Created:** [January 11, 2022, 2:54pm UTC](https://devforum.okta.com/t/react-spa-auto-refresh-not-working-after-calling-renew-from-react/18846 "2022-01-11T14:54:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gbulmer](https://avatars.discourse-cdn.com/v4/letter/g/5f8ce5/32.png) [@gbulmer](https://devforum.okta.com/u/gbulmer)\
**Post date:** [January 11, 2022, 2:54pm UTC](https://devforum.okta.com/t/react-spa-auto-refresh-not-working-after-calling-renew-from-react/18846/1 "2022-01-11T14:54:59Z")

</div>

We have a React Single-Spa where auto refresh of our tokens is set up and was working. That is until we tried to handle edge cases for the off chance a browser doesn’t handle auto refresh or for whatever reason this fails. We are calling renew ourselves in this case. However, now it seems auto refresh has stopped working (even when we don’t call renew from our code.)

Our setting in Okta:

 ![image](https://global.discourse-cdn.com/oktadev/original/2X/c/c4b0958d1723e199c969fcaf3d2bbca86e0a92fc.png)

Access/Id token expiration is set to 1 hour. Refresh Token expiration is set to 7 days.

Will calling the tokenManager.renew method turn off auto refresh?

---

<div class="post-metadata">

**Author:** ![andrea](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/andrea/32/2172_2.png) [@andrea](https://devforum.okta.com/u/andrea)\
**Post date:** [February 8, 2024, 9:16pm UTC](https://devforum.okta.com/t/react-spa-auto-refresh-not-working-after-calling-renew-from-react/18846/2 "2024-02-08T21:16:50Z")

</div>

Closed on February 8, 2024, 9:16pm UTC


