@@ -16,15 +16,15 @@ import {
1616 AuthToken ,
1717 RefreshTokenEntity ,
1818 AuthorityType ,
19- CacheRecord ,
20- AuthenticationResult ,
2119 Constants ,
2220} from "@azure/msal-common" ;
2321import { BrowserConfiguration } from "../config/Configuration" ;
2422import { SilentRequest } from "../request/SilentRequest" ;
2523import { BrowserCacheManager } from "./BrowserCacheManager" ;
2624import { ITokenCache } from "./ITokenCache" ;
2725import { BrowserAuthError } from "../error/BrowserAuthError" ;
26+ import { AuthenticationResult } from "../response/AuthenticationResult" ;
27+ import { CacheRecord } from "./entities/CacheRecord" ;
2828
2929export type LoadTokenOptions = {
3030 clientInfo ?: string ;
@@ -84,7 +84,7 @@ export class TokenCache implements ITokenCache {
8484
8585 const idToken = new AuthToken ( response . id_token , this . cryptoObj ) ;
8686
87- let cacheRecord : CacheRecord | undefined ;
87+ let cacheRecord : CacheRecord ;
8888 let authority : Authority | undefined ;
8989
9090 if ( request . account ) {
@@ -435,7 +435,7 @@ export class TokenCache implements ITokenCache {
435435 private generateAuthenticationResult (
436436 request : SilentRequest ,
437437 idTokenObj : AuthToken ,
438- cacheRecord ? : CacheRecord ,
438+ cacheRecord : CacheRecord ,
439439 authority ?: Authority
440440 ) : AuthenticationResult {
441441 let accessToken : string = Constants . EMPTY_STRING ;
@@ -469,9 +469,7 @@ export class TokenCache implements ITokenCache {
469469 uniqueId : uid ,
470470 tenantId : tid ,
471471 scopes : responseScopes ,
472- account : cacheRecord ?. account
473- ? cacheRecord . account . getAccountInfo ( )
474- : null ,
472+ account : cacheRecord . account . getAccountInfo ( ) ,
475473 idToken : idTokenObj ? idTokenObj . rawToken : Constants . EMPTY_STRING ,
476474 idTokenClaims : idTokenObj ? idTokenObj . claims : { } ,
477475 accessToken : accessToken ,
0 commit comments