File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,6 @@ import {
26
26
UpdateAuthInfoEvent ,
27
27
} from './authInfo' ;
28
28
import { OAuthRefesher } from './oauthRefresher' ;
29
- import { Tokens } from './tokens' ;
30
29
const keychainServiceNameV3 = version . endsWith ( '-insider' ) ? 'atlascode-insiders-authinfoV3' : 'atlascode-authinfoV3' ;
31
30
32
31
enum Priority {
@@ -306,15 +305,14 @@ export class CredentialManager implements Disposable {
306
305
/**
307
306
* Calls the OAuth provider and updates the access token.
308
307
*/
309
- public async refreshAccessToken ( site : DetailedSiteInfo ) : Promise < Tokens | undefined > {
308
+ public async refreshAccessToken ( site : DetailedSiteInfo ) : Promise < boolean > {
310
309
const credentials = await this . getAuthInfo ( site ) ;
311
310
if ( ! isOAuthInfo ( credentials ) ) {
312
- return undefined ;
311
+ return false ;
313
312
}
314
313
Logger . debug ( `refreshingAccessToken for ${ site . baseApiUrl } credentialID: ${ site . credentialId } ` ) ;
315
314
316
315
const provider : OAuthProvider | undefined = oauthProviderForSite ( site ) ;
317
- const newTokens = undefined ;
318
316
if ( provider && credentials ) {
319
317
const tokenResponse = await this . _refresher . getNewTokens ( provider , credentials . refresh ) ;
320
318
if ( tokenResponse . tokens ) {
@@ -333,7 +331,7 @@ export class CredentialManager implements Disposable {
333
331
this . saveAuthInfo ( site , credentials ) ;
334
332
}
335
333
}
336
- return newTokens ;
334
+ return true ;
337
335
}
338
336
339
337
/**
You can’t perform that action at this time.
0 commit comments