diff --git a/src/Auth.ts b/src/Auth.ts index f567b1cb0ae..2c2cc83f597 100644 --- a/src/Auth.ts +++ b/src/Auth.ts @@ -462,7 +462,7 @@ export class Auth { await logger.logToStderr(`🌶️ ${response.message}`); } - if (cli.getSettingWithDefaultValue(settingsNames.autoOpenLinksInBrowser, false)) { + if (cli.getSettingWithDefaultValue(settingsNames.autoOpenLinksInBrowser, false) && response.verificationUri !== undefined) { await browserUtil.open(response.verificationUri); } @@ -475,7 +475,9 @@ export class Auth { this._clipboardy = (await import('clipboardy')).default; } - this._clipboardy.writeSync(response.userCode); + if (response.userCode !== undefined) { + this._clipboardy.writeSync(response.userCode); + } } }