diff --git a/src/Auth.ts b/src/Auth.ts index 1cfa69e1294..c220c6caf89 100644 --- a/src/Auth.ts +++ b/src/Auth.ts @@ -420,7 +420,17 @@ export class Auth { await logger.logToStderr(''); } - await logger.log(response.message); + const cli = Cli.getInstance(); + cli.spinner.text = response.message; + cli.spinner.spinner = { + frames: ['🌶️ '] + }; + + // don't show spinner if running tests + /* c8 ignore next 3 */ + if (!cli.spinner.isSpinning && typeof global.it === 'undefined') { + cli.spinner.start(); + } if (Cli.getInstance().getSettingWithDefaultValue(settingsNames.autoOpenLinksInBrowser, false)) { browserUtil.open(response.verificationUri); diff --git a/src/m365/commands/login.ts b/src/m365/commands/login.ts index 9bb64d00f11..63329a58392 100644 --- a/src/m365/commands/login.ts +++ b/src/m365/commands/login.ts @@ -205,7 +205,7 @@ class LoginCommand extends Command { } if (this.debug) { - await logger.logToStderr({ + await logger.log({ connectedAs: accessToken.getUserNameFromAccessToken(auth.service.accessTokens[auth.defaultResource].accessToken), authType: AuthType[auth.service.authType], appId: auth.service.appId, @@ -215,7 +215,7 @@ class LoginCommand extends Command { }); } else { - await logger.logToStderr({ + await logger.log({ connectedAs: accessToken.getUserNameFromAccessToken(auth.service.accessTokens[auth.defaultResource].accessToken), authType: AuthType[auth.service.authType], appId: auth.service.appId,