Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
window.applicationConfig = {
clientID: '883bb2bc-6548-4906-b842-17014a0601a1',
consentScopes: ["user.read"],
webApiEndpoint: "https://buildtodoservice.azurewebsites.net/api/todolist",
webApiScopes: ['api://a88bb933-319c-41b5-9f04-eff36d985612/access_as_user'],
userProfileEndpoint: "https://graph.microsoft.com/v1.0/me",
userProfileScopes: ["user.read"],
};
var protectedResourceMap = new Map();
protectedResourceMap.set(applicationConfig.webApiEndpoint, applicationConfig.webApiScopes);
protectedResourceMap.set(applicationConfig.userProfileEndpoint, applicationConfig.userProfileScopes);
var logger = new Msal.Logger(loggerCallback, {level: Msal.LogLevel.Verbose, correlationId: '12345'});
function loggerCallback(logLevel, message, piiEnabled) {
console.log(message);
}
if (window !== window.parent && !window.opener) {
angular.module('todoApp', ['ui.router', 'MsalAngular'])
.config(['$httpProvider', 'msalAuthenticationServiceProvider','$locationProvider', function ($httpProvider, msalProvider,$locationProvider) {
msalProvider.init({
clientID: applicationConfig.clientID,
authority: 'https://login.microsoftonline.com/common',
tokenReceivedCallback: function (errorDesc, token, error, tokenType) {
},
optionalParams: {
cacheLocation: 'localStorage',
logger: logger,