Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return new Promise(async (resolve) => {
const loggerCallback = (logLevel, message, containsPii) => {
console.log(`Auth: [${logLevel} ${message}`);
};
const singleMessage = (location) => {
return (message) => {
console.log(`Auth - ${location}: ${message}`);
};
};
const logger = new Logger(
loggerCallback,
{correlationId: "1234", level: LogLevel.Info, piiLoggingEnabled: true});
const redirectUri = "" + Uri + (Uri.substring(Uri.length - 1, Uri.length) === "/" ? "login" : "/login");
console.log(`redirectUri : ${Uri}, ${redirectUri}, ${Uri.substring(Uri.length - 1, Uri.length)}`);
this.msal = new UserAgentApplication(
{
auth: {
clientId: this.clientId,
authority: `https://login.microsoftonline.com/${this.tenantId}`,
redirectUri
},
cache: {
cacheLocation: "localStorage",
storeAuthStateInCookie: true
},
system: {