Skip to content

Commit 137fe75

Browse files
committed
- fixes build issues
1 parent de082f6 commit 137fe75

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

helpers/authHelper.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export function getAuthUrl() {
2121
* @param {AcquireTokenCallback} callback The callback function.
2222
*/
2323
export function getTokenFromCode(code) {
24-
const authContext = new ConfidentialClientApplication(msalConfiguration.authority);
24+
const authContext = new ConfidentialClientApplication(msalConfiguration.authority); // TODO replace by onbehalf when available
2525
return new Promise((resolve, reject) => {
2626
authContext.acquireTokenWithAuthorizationCode(
2727
code,
@@ -41,8 +41,8 @@ export function getTokenFromCode(code) {
4141
}
4242

4343
export function getAppOnlyToken() {
44-
const authContext = new AuthenticationContext(msalConfiguration.authority.replace('common', msalConfiguration.tenantID));
45-
return new Promise((resolve, reject) => {
44+
const authContext = new ConfidentialClientApplication(msalConfiguration.authority.replace('common', msalConfiguration.tenantID));
45+
return new Promise((resolve, reject) => { // TODO replace by client credential flow when available
4646
authContext.acquireTokenWithClientCredentials(resource, msalConfiguration.clientID, msalConfiguration.clientSecret, (err, token) => {
4747
if (err) {
4848
reject(err);

0 commit comments

Comments
 (0)