Skip to content

Commit

Permalink
cleanup msalflow
Browse files Browse the repository at this point in the history
  • Loading branch information
maorleger committed May 2, 2024
1 parent ec347c8 commit 29c4764
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions sdk/identity/identity/src/credentials/deviceCodeCredential.ts
Expand Up @@ -19,7 +19,6 @@ import { tracingClient } from "../util/tracing";
import { MsalClient, createMsalClient } from "../msal/nodeFlows/msalClient";
import { DeveloperSignOnClientId } from "../constants";
import { MsalDeviceCode } from "../msal/nodeFlows/msalDeviceCode";
import { MsalFlow } from "../msal/flows";

const logger = credentialLogger("DeviceCodeCredential");

Expand All @@ -38,7 +37,6 @@ export function defaultDeviceCodePromptCallback(deviceCodeInfo: DeviceCodeInfo):
export class DeviceCodeCredential implements TokenCredential {
private tenantId?: string;
private additionallyAllowedTenantIds: string[];
private msalFlow: MsalFlow;
private disableAutomaticAuthentication?: boolean;
private msalClient: MsalClient;
private userPromptCallback: DeviceCodePromptCallback;
Expand Down Expand Up @@ -75,12 +73,6 @@ export class DeviceCodeCredential implements TokenCredential {
...options,
tokenCredentialOptions: options || {},
});
this.msalFlow = new MsalDeviceCode({
...options,
logger,
userPromptCallback: options?.userPromptCallback || defaultDeviceCodePromptCallback,
tokenCredentialOptions: options || {},
});
this.disableAutomaticAuthentication = options?.disableAutomaticAuthentication;
}

Expand Down Expand Up @@ -113,10 +105,6 @@ export class DeviceCodeCredential implements TokenCredential {
...newOptions,
disableAutomaticAuthentication: this.disableAutomaticAuthentication,
});
return this.msalFlow.getToken(arrayScopes, {
...newOptions,
disableAutomaticAuthentication: this.disableAutomaticAuthentication,
});
},
);
}
Expand Down Expand Up @@ -145,8 +133,6 @@ export class DeviceCodeCredential implements TokenCredential {
disableAutomaticAuthentication: false, // this method should always allow user interaction
});
return this.msalClient.getActiveAccount();
// await this.msalFlow.getToken(arrayScopes, newOptions);
// return this.msalFlow.getActiveAccount();
},
);
}
Expand Down

0 comments on commit 29c4764

Please sign in to comment.