I want to implement a dynamic login using msal, which includes passing the username and password in the login function and not ask for the Microsoft login prompt so that the user will log in to an account as soon as the page loads.
I have been reading a bit on the documentation on msal with react but didn't find any solutions for this problem.
This is the code I have for login. I am confused about what parameters I should pass to enable a dynamic log in for the application.
this.userAgentApplication = new UserAgentApplication({
auth: {
clientId: config.appId
},
cache: {
cacheLocation: "localStorage",
storeAuthStateInCookie: true
}
});
var user = this.userAgentApplication.getAccount();