# iOS - Handle concurrency to "renew"

**URL:** <https://devforum.okta.com/t/ios-handle-concurrency-to-renew/6529>\
**Category:** Questions\
**Created:** [October 8, 2019, 4:52pm UTC](https://devforum.okta.com/t/ios-handle-concurrency-to-renew/6529 "2019-10-08T16:52:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![srgray](https://avatars.discourse-cdn.com/v4/letter/s/a88e4f/32.png) [@srgray](https://devforum.okta.com/u/srgray)\
**Post date:** [October 8, 2019, 4:52pm UTC](https://devforum.okta.com/t/ios-handle-concurrency-to-renew/6529/1 "2019-10-08T16:52:01Z")

</div>

We’ve implemented the OktaOidc pod into our iOS app per the example projects. We are facing an issue when our accessToken has expired, though. When we detect that the accessToken has expired, we call `OktaOidcStateManager.renew` to get a refresh accessToken. That is working as expected.

The problem arises when we have multiple/concurrent attempts to get the accessToken (which has expired). Each of those attempts calls `OktaOidcStateManager.renew` and we end up running into concurrency issues.

Do you have a recommendation on how to handle/avoid this situation?

---

<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:** [January 23, 2024, 7:27pm UTC](https://devforum.okta.com/t/ios-handle-concurrency-to-renew/6529/2 "2024-01-23T19:27:21Z")

</div>

Closed on January 23, 2024, 7:27pm UTC


