You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: Zoom - More logging and fix for unexpected errors seen in logs (calcom#22118)
* fix: Use WEBAPP_URL_FOR_OAUTH to be able to use http://localhost:3000
for local testing
* In case of JSON.parse crash that could happen if zoom reponsed with xml
* Fix cases where auto_recording and default_password_for_scheduled_meetings could be nullish
Copy file name to clipboardExpand all lines: packages/app-store/_utils/oauth/OAuthManager.ts
+14-3Lines changed: 14 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,12 @@
1
1
/**
2
-
* Manages OAuth2.0 tokens for an app and resourceOwner. It automatically refreshes the token when needed.
3
-
* It is aware of the credential sync endpoint and can sync the token from the third party source.
4
-
* It is unaware of Prisma and App logic. It is just a utility to manage OAuth2.0 tokens with life cycle methods
2
+
* Manages OAuth2.0 as well as JWT tokens(For JWT tokens, only Google Calendar use it at the moment) for an app and resourceOwner.
3
+
* What it does
4
+
* - It automatically refreshes the token if needed when making a request.
5
+
* - It is aware of the credential sync endpoint and can sync the token from the third party source.
6
+
* - It is kept unaware of Prisma and App logic. It is just a utility to manage OAuth2.0 tokens with life cycle methods
7
+
*
8
+
* What it doesn't do yet
9
+
* - It doesn't have a flow to re-send the request if the access-token had been communicated as invalid after making the request itself. It relies on the caller to make the next request in which it will actually refresh the token.
5
10
*
6
11
* For a recommended usage example, see Zoom VideoApiAdapter.ts
7
12
*/
@@ -89,7 +94,13 @@ export class OAuthManager {
89
94
currentTokenObject,
90
95
fetchNewTokenObject,
91
96
updateTokenObject,
97
+
/**
98
+
* The fn must not crash. It is the responsibility of the caller to handle any error and appropriately decide what to return
99
+
*/
92
100
isTokenObjectUnusable,
101
+
/**
102
+
* The fn must not crash. It is the responsibility of the caller to handle any error and appropriately decide what to return
0 commit comments