# Issue migrating JWT to Server-to-Server OAuth

**URL:** <https://devforum.zoom.us/t/issue-migrating-jwt-to-server-to-server-oauth/82340>\
**Category:** API and Webhooks\
**Tags:** server-to-server\
**Created:** [January 30, 2023, 3:51pm UTC](https://devforum.zoom.us/t/issue-migrating-jwt-to-server-to-server-oauth/82340 "2023-01-30T15:51:36Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![MultiplayerSession](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/multiplayersession/32/66446_2.png) [@MultiplayerSession](https://devforum.zoom.us/u/MultiplayerSession)\
**Post date:** [March 30, 2023, 9:36pm UTC](https://devforum.zoom.us/t/issue-migrating-jwt-to-server-to-server-oauth/82340/10 "2023-03-30T21:36:28Z")

</div>

For [key rotation](https://devforum.zoom.us/t/refresh-token-workflow-for-multi-tenant-apps/79405/2), we use a shared database that acts as a synchronization primitive to decide on a race condition winner process that [renews the token for the inactive slot well in advance](https://devforum.zoom.us/t/randomly-receiving-invalid-access-token-for-server-to-server-oauth/74432/15), then swaps that slot into active use for everyone in the same environment. This means you need 2 slots per environment, so we ended up creating multiple duplicate applications so we could have 4 slots to allocate among 2 environments.

---

_[View the full topic](https://devforum.zoom.us/t/issue-migrating-jwt-to-server-to-server-oauth/82340)._
