Changesets · Branches · Tags · Compare
| Changeset | 3389e73db7c2b519f984fe5b60dd48e990831a24db852252362736cf7c8cb9eb |
|---|---|
| Author | Nate <sestinj@gmail.com> · 2025-07-07 22:59 -07:00 |
| Committer | Nate <sestinj@gmail.com> · 2025-07-07 22:59 -07:00 |
| Parents | 01b1169c3d6e |
1 file changed
modified extensions/vscode/src/stubs/WorkOsAuthProvider.ts +3 −6
| @@ -198,12 +198,9 @@ | ||
| 198 | 198 | const finalSessions = []; |
| 199 | 199 | for (const session of sessions) { |
| 200 | 200 | try { |
| 201 | - // For expired tokens, don't use retries - if refresh fails, we drop the session | |
| 202 | - const refreshMethod = this.jwtIsExpiredOrInvalid(session.accessToken) | |
| 203 | - ? this._refreshSession.bind(this) // Direct refresh for expired tokens | |
| 204 | - : this._refreshSessionWithRetry.bind(this); // Retry for valid tokens | |
| 205 | - | |
| 206 | - const newSession = await refreshMethod(session.refreshToken); | |
| 201 | + const newSession = await this._refreshSessionWithRetry( | |
| 202 | + session.refreshToken, | |
| 203 | + ); | |
| 207 | 204 | finalSessions.push({ |
| 208 | 205 | ...session, |
| 209 | 206 | accessToken: newSession.accessToken, |