Hi Team,
I am trying to to add azure AD B2C authentication to my project. The example code that I found includes msal. I am using nodeJS. Now I am getting the error "navigator is not defined".
code:
const clientId = "INSERT-CLIENT-APP-ID"; // Client Id of the registered application
const callback = (errorDesc, token, error, tokenType) => {};
// An Optional options for initializing the MSAL @SEE https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics#configuration-options
const options = {
redirectUri: "Your redirect URI",
};
const graphScopes = ["user.read", "mail.send"]; // An array of graph scopes
// Initialize the MSAL @SEE https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics#initialization-of-msal
const userAgentApplication = new UserAgentApplication(clientId, undefined, callback, options);
const authProvider = new MSALAuthenticationProvider(userAgentApplication, graphScopes );
link: https://video2.skills-academy.com/en-us/graph/sdks/create-client?view=graph-rest-1.0&tabs=Javascript
Is msal client side? If so is there any alternative?.
Please help. Thank You