# Long sessions in a SPA

**URL:** <https://devforum.okta.com/t/long-sessions-in-a-spa/9035>\
**Category:** Questions\
**Created:** [April 23, 2020, 4:35pm UTC](https://devforum.okta.com/t/long-sessions-in-a-spa/9035 "2020-04-23T16:35:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexandre.victoor](https://avatars.discourse-cdn.com/v4/letter/a/e8c25b/32.png) [@alexandre.victoor](https://devforum.okta.com/u/alexandre.victoor)\
**Post date:** [April 23, 2020, 4:35pm UTC](https://devforum.okta.com/t/long-sessions-in-a-spa/9035/1 "2020-04-23T16:35:15Z")

</div>

Hello,  
I have integrated okta oidc in an existing react application using the okta sign-in widget. I am using the developer edition of okta. I have noticed that the max expiration time of access tokens is 1 day. What would be the best way to implement longer sessions?  
I have seen posts about “silent token renewal” but have not seen any doc on how to configure that in. the sign-in widget.  
Thanks a lot for your help

Alex

---

<div class="post-metadata">

**Author:** ![alexandre.victoor](https://avatars.discourse-cdn.com/v4/letter/a/e8c25b/32.png) [@alexandre.victoor](https://devforum.okta.com/u/alexandre.victoor)\
**Post date:** [April 23, 2020, 7:53pm UTC](https://devforum.okta.com/t/long-sessions-in-a-spa/9035/2 "2020-04-23T19:53:32Z")

</div>

I guess I have figured out how to configure with react the token renewal, using a tokenManager props on a Security component. However I might have found an issue: if two token renewal requests are performed at the same time, only one out of two will succeed.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/oktadev/original/1X/589c4c5f80de422d01f47cee7185a7fb8227835c.png) [@system](https://devforum.okta.com/u/system)\
**Post date:** [January 23, 2024, 11:20pm UTC](https://devforum.okta.com/t/long-sessions-in-a-spa/9035/3 "2024-01-23T23:20:31Z")

</div>

Closed on January 23, 2024, 11:20pm UTC

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
