Skip to content

Commit 24527bd

Browse files
committed
remove console log and creds
1 parent feb52dd commit 24527bd

2 files changed

Lines changed: 3 additions & 11 deletions

File tree

1-Authentication/6-sign-in-node-cli-app/App/authConfig.js

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import { LogLevel } from '@azure/msal-node';
77
*/
88
export const msalConfig = {
99
auth: {
10-
clientId: '2e9d2f02-7eb8-4cc3-9bd8-5e67eff7b80b',
11-
authority: 'https://TrialTenantkwFwHYij.ciamlogin.com/',
10+
clientId: 'Enter_the_Application_Id_Here',
11+
authority: 'https://Enter_the_Tenant_Subdomain_Here.ciamlogin.com/',
1212
},
1313
system: {
1414
loggerOptions: {
@@ -29,9 +29,4 @@ export const msalConfig = {
2929
*/
3030
export const loginRequest = {
3131
scopes: [],
32-
};
33-
34-
// module.exports = {
35-
// msalConfig: msalConfig,
36-
// loginRequest: loginRequest,
37-
// };
32+
};

1-Authentication/6-sign-in-node-cli-app/App/index.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,12 @@ const pca = new PublicClientApplication(msalConfig);
3030

3131
const acquireToken = async () => {
3232
const accounts = await pca.getTokenCache().getAllAccounts();
33-
console.log(accounts);
3433
if (accounts.length === 1) {
3534
const silentRequest = {
3635
account: accounts[0],
3736
};
3837

3938
return pca.acquireTokenSilent(silentRequest).catch((e) => {
40-
console.log(e);
4139
if (e instanceof InteractionRequiredAuthError) {
4240
return pca.acquireTokenInteractive(tokenRequest);
4341
}
@@ -48,7 +46,6 @@ const acquireToken = async () => {
4846
});
4947
return Promise.reject('Multiple accounts found. Please select an account to use.');
5048
} else {
51-
console.log(pca);
5249
return pca.acquireTokenInteractive(tokenRequest);
5350
}
5451
};

0 commit comments

Comments
 (0)