@@ -218,8 +218,6 @@ export class Auth implements AuthService, ConnectionManager {
218218 public async reauthenticate ( { id } : Pick < IamConnection , 'id' > , invalidate ?: boolean ) : Promise < IamConnection >
219219 @withTelemetryContext ( { name : 'reauthenticate' , class : authClassName } )
220220 public async reauthenticate ( { id } : Pick < Connection , 'id' > , invalidate ?: boolean ) : Promise < Connection > {
221- //eslint-disable-next-line aws-toolkits/no-console-log
222- console . log ( 'reauthenticate is called' )
223221 const shouldInvalidate = invalidate ?? true
224222 const profile = this . store . getProfileOrThrow ( id )
225223 if ( profile . type === 'sso' ) {
@@ -454,8 +452,6 @@ export class Auth implements AuthService, ConnectionManager {
454452 */
455453 @withTelemetryContext ( { name : 'refreshConnectionState' , class : authClassName } )
456454 public async refreshConnectionState ( connection ?: Pick < Connection , 'id' > ) : Promise < undefined > {
457- //eslint-disable-next-line aws-toolkits/no-console-log
458- console . log ( 'refreshConnectionState called' )
459455 if ( connection === undefined ) {
460456 return
461457 }
@@ -650,11 +646,7 @@ export class Auth implements AuthService, ConnectionManager {
650646 */
651647 @withTelemetryContext ( { name : 'validateConnection' , class : authClassName } )
652648 private async validateConnection < T extends Profile > ( id : Connection [ 'id' ] , profile : StoredProfile < T > ) {
653- //eslint-disable-next-line aws-toolkits/no-console-log
654- console . log ( 'validateConnection is called' )
655649 const runCheck = async ( ) => {
656- //eslint-disable-next-line aws-toolkits/no-console-log
657- console . log ( 'runCheck is called' )
658650 if ( profile . type === 'sso' ) {
659651 const provider = this . getSsoTokenProvider ( id , profile )
660652 if ( ( await provider . getToken ( ) ) === undefined ) {
@@ -856,8 +848,6 @@ export class Auth implements AuthService, ConnectionManager {
856848 }
857849
858850 private async createCachedCredentials ( provider : CredentialsProvider ) {
859- //eslint-disable-next-line aws-toolkits/no-console-log
860- console . log ( 'createCachedCredentials called' )
861851 const providerId = provider . getCredentialsId ( )
862852 globals . loginManager . store . invalidateCredentials ( providerId )
863853 const { credentials } = await globals . loginManager . store . upsertCredentials ( providerId , provider )
@@ -868,16 +858,7 @@ export class Auth implements AuthService, ConnectionManager {
868858
869859 private async getCachedCredentials ( provider : CredentialsProvider ) {
870860 const creds = await globals . loginManager . store . getCredentials ( provider . getCredentialsId ( ) )
871- //eslint-disable-next-line aws-toolkits/no-console-log
872- console . log (
873- 'provider hash is same as credentials has: %O' ,
874- creds ?. credentialsHashCode === provider . getHashCode ( )
875- )
876- //eslint-disable-next-line aws-toolkits/no-console-log
877- console . log ( 'creds is undefined: %O' , creds === undefined )
878861 if ( creds !== undefined && creds . credentialsHashCode === provider . getHashCode ( ) ) {
879- //eslint-disable-next-line aws-toolkits/no-console-log
880- console . log ( 'returning cached credentials' )
881862 return creds . credentials
882863 }
883864 }
@@ -921,26 +902,19 @@ export class Auth implements AuthService, ConnectionManager {
921902 private readonly getCredentials = keyedDebounce ( this . _getCredentials . bind ( this ) )
922903 private async _getCredentials ( id : Connection [ 'id' ] , provider : CredentialsProvider ) : Promise < Credentials > {
923904 const credentials = await this . getCachedCredentials ( provider )
924- //eslint-disable-next-line aws-toolkits/no-console-log
925- console . log ( 'credentials is undefined: %O' , credentials === undefined )
926905 if ( credentials !== undefined ) {
927- //eslint-disable-next-line aws-toolkits/no-console-log
928- console . log ( 'hit sad path (cache passed)' )
929906 return credentials
930907 } else if ( ( await provider . canAutoConnect ( ) ) === true ) {
931908 return this . createCachedCredentials ( provider )
932909 } else {
933- //eslint-disable-next-line aws-toolkits/no-console-log
934- console . log ( 'hit happy path (cache failed)' )
935910 return this . handleInvalidCredentials ( id , ( ) => this . createCachedCredentials ( provider ) )
936911 }
937912 }
938913
939914 @withTelemetryContext ( { name : 'handleInvalidCredentials' , class : authClassName } )
940915 private async handleInvalidCredentials < T > ( id : Connection [ 'id' ] , refresh : ( ) => Promise < T > ) : Promise < T > {
941916 getLogger ( ) . info ( `auth: Handling invalid credentials of connection: ${ id } ` )
942- //eslint-disable-next-line aws-toolkits/no-console-log
943- console . log ( 'handleInvalidCredentials called' )
917+
944918 let profile : StoredProfile
945919 try {
946920 profile = this . store . getProfileOrThrow ( id )
0 commit comments