Fix prompt for auth/device auth method (#21272)

This commit is contained in:
Christopher Suh
2022-11-18 15:17:46 -08:00
committed by GitHub
parent 728a90cd53
commit 0bc5f68d29

View File

@@ -63,10 +63,12 @@ export class AzureAccountProvider implements azdata.AccountProvider, vscode.Disp
if (codeGrantMethod === true && !this.forceDeviceCode) {
this.authMappings.set(AzureAuthType.AuthCodeGrant, new AzureAuthCodeGrant(metadata, tokenCache, context, uriEventHandler));
} else if (deviceCodeMethod === true || this.forceDeviceCode) {
}
if (deviceCodeMethod === true || this.forceDeviceCode) {
this.authMappings.set(AzureAuthType.DeviceCode, new AzureDeviceCode(metadata, tokenCache, context, uriEventHandler));
} else {
console.error('No authentication methods selected');
}
if (codeGrantMethod === false && deviceCodeMethod === false && !this.forceDeviceCode) {
Logger.error('Error: No authentication methods selected');
}
}