1

i have created react dotnet core webapp and implemented AAD authnetication for front end using "react-adal".But not getting how can i authenticate backend.

Please suggest any approach !

1 Answer 1

1

It is recommended to use MSAL as ADAL is being deprecated.

Also, front end libraries uses implicit and auth code flow which will authenticate in front end itself. So, since you are using front end library it is not possible to auth with back end. For authenticating with BAckend use backend language like asp.net(we can use Msal.net library).

Here is a Sample on how to use MSAL with React to call Microsoft Graph.

The only different in your case will be that instead of calling Microsoft Graph, you will call your own API.

Bottomline is - there is no direct integration package yet for react. Which can also be read from the official statement on the msal-js repo:

After our current libraries are up to standards, we will begin balancing new feature requests, with new platforms such as react and node.js.

If you want to use .net core instead then please go through the sample here

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.