How do I implement Microsoft login with MSAL?


I'm completely stuck trying to get a MSAL based Microsoft login system to work (possibly don't know enough about React)....

On the pages/auth/Auth.js page I've got

We are authenticated!!

In my social logins section, the popup triggers and I can sign in with my account and then I get the expected 'we are authenticated' message.

How do I then set a token to mark the user as logged in? My SignInSignOutButton is outside the Login class, so I don't seem to be able to use this.props.dispatch to run the receiveToken, doInit and push('/app') actions?

Completely stuck here so any help would be welcome...


Do you have microsoft creds for login? You should register there and add your secret keys to the .env file, please check out microsoft forums out there

Cookie Consent

By continuing to browse or by clicking 'OK', you agree to the storing of cookies on your device to enhance your site experience and for analytical purposes. To learn more about how we use cookies, please see our cookies policy.