How to use the msal.LogLevel.Info function in msal

To help you get started, we’ve selected a few msal examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github TypedProject / ts-express-decorators / examples / passport-azure-ad / packages / client / src / app / services / core / azureAd / AuthService.ts View on Github external
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: {