Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not handle multi-threaded token invalidation #14

Open
ruswerner opened this issue May 8, 2023 · 0 comments
Open

Does not handle multi-threaded token invalidation #14

ruswerner opened this issue May 8, 2023 · 0 comments

Comments

@ruswerner
Copy link

ruswerner commented May 8, 2023

Just in case someone else was using this library with JWT and has moved to Server-to-server Oauth (v2.x)... this library does not support multi-threaded server applications with Oauth out of the box. By default, Zoom will invalidate any previous oauth tokens when requesting a new one. This library always requests a new token. Thus if you have a multi-threaded or multi-instance server application, you will get random race conditions with "Invalid access token" errors in your logs. See this zoom discussion for more context:

https://devforum.zoom.us/t/server-to-server-oauth-annoying-token-invalidation/72070/15

tl;dr
You need to implement your own thread-safe shared token service, and then you can use the onGetAccessToken feature of this library to avoid fetching the token directly from zoom and instead fetch it from your token service.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant