File tree Expand file tree Collapse file tree
extensions/microsoft-authentication/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ interface ITokenClaims {
4545 tid : string ;
4646 email ?: string ;
4747 unique_name ?: string ;
48+ exp ?: number ;
4849 preferred_username ?: string ;
4950 oid ?: string ;
5051 altsecid ?: string ;
@@ -182,6 +183,7 @@ export class AzureActiveDirectoryService {
182183 } ;
183184 } ) ;
184185
186+ Logger . trace ( 'storing data into keychain...' ) ;
185187 await this . _keychain . setToken ( JSON . stringify ( serializedData ) ) ;
186188 }
187189
@@ -537,7 +539,8 @@ export class AzureActiveDirectoryService {
537539 onDidChangeSessions . fire ( { added : [ ] , removed : [ this . convertToSessionSync ( token ) ] , changed : [ ] } ) ;
538540 }
539541 }
540- } , 1000 * ( token . expiresIn - 30 ) ) ) ;
542+ // For details on why this is set to 2/3... see https://github.com/microsoft/vscode/issues/133201#issuecomment-966668197
543+ } , 1000 * ( token . expiresIn * 2 / 3 ) ) ) ;
541544 }
542545
543546 await this . storeTokenData ( ) ;
You can’t perform that action at this time.
0 commit comments