🎅 HOHOHO! 85%OFF Flatlogic Generator! 🎄Build your custom CRM, ERP, or SaaS app with full code ownership this Christmas 🎁

How do I implement Microsoft login with MSAL?

Gravatar

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...

Gravatar

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