@@ -867,14 +867,14 @@ export class Auth implements AuthService, ConnectionManager {
867867 }
868868
869869 private async getCachedCredentials ( provider : CredentialsProvider ) {
870- //eslint-disable-next-line aws-toolkits/no-console-log
871- console . log ( 'getCachedCredentials called' )
872870 const creds = await globals . loginManager . store . getCredentials ( provider . getCredentialsId ( ) )
873871 //eslint-disable-next-line aws-toolkits/no-console-log
874872 console . log (
875873 'provider hash is same as credentials has: %O' ,
876874 creds ?. credentialsHashCode === provider . getHashCode ( )
877875 )
876+ //eslint-disable-next-line aws-toolkits/no-console-log
877+ console . log ( 'creds is undefined: %O' , creds === undefined )
878878 if ( creds !== undefined && creds . credentialsHashCode === provider . getHashCode ( ) ) {
879879 //eslint-disable-next-line aws-toolkits/no-console-log
880880 console . log ( 'returning cached credentials' )
@@ -885,8 +885,6 @@ export class Auth implements AuthService, ConnectionManager {
885885 private readonly getToken = keyedDebounce ( this . _getToken . bind ( this ) )
886886 @withTelemetryContext ( { name : '_getToken' , class : authClassName } )
887887 private async _getToken ( id : Connection [ 'id' ] , provider : SsoAccessTokenProvider ) : Promise < SsoToken > {
888- //eslint-disable-next-line aws-toolkits/no-console-log
889- console . log ( '_getToken called' )
890888 const token = await provider . getToken ( ) . catch ( ( err ) => {
891889 this . throwOnRecoverableError ( err )
892890
@@ -922,20 +920,18 @@ export class Auth implements AuthService, ConnectionManager {
922920
923921 private readonly getCredentials = keyedDebounce ( this . _getCredentials . bind ( this ) )
924922 private async _getCredentials ( id : Connection [ 'id' ] , provider : CredentialsProvider ) : Promise < Credentials > {
925- //eslint-disable-next-line aws-toolkits/no-console-log
926- console . log ( '_getCredentials called' )
927923 const credentials = await this . getCachedCredentials ( provider )
928924 //eslint-disable-next-line aws-toolkits/no-console-log
929925 console . log ( 'credentials is undefined: %O' , credentials === undefined )
930926 if ( credentials !== undefined ) {
931927 //eslint-disable-next-line aws-toolkits/no-console-log
932- console . log ( 'returning cached credentials ' )
928+ console . log ( 'hit sad path (cache passed) ' )
933929 return credentials
934930 } else if ( ( await provider . canAutoConnect ( ) ) === true ) {
935931 return this . createCachedCredentials ( provider )
936932 } else {
937933 //eslint-disable-next-line aws-toolkits/no-console-log
938- console . log ( 'hit case with handleInvalidCredentials ' )
934+ console . log ( 'hit happy path (cache failed) ' )
939935 return this . handleInvalidCredentials ( id , ( ) => this . createCachedCredentials ( provider ) )
940936 }
941937 }
0 commit comments