In this tutorial, we’ll walk through using Azure Active Directory (AD) to secure a React application with a .NET Core backend.
create-react-apphttp://localhost:3000).For redirecting logout to work without HTTPS, modify the Front-Channel Logout in the manifest.

Make sure to expose the api scope

Microsoft.AspNetCore.Authentication.JwtBearer NuGet package.In the appsettings.json

In program config

react-aad-msal npm package to handle authentication with Azure AD.react-aad-msal provider component to use your Azure AD application’s client ID and redirect URI.react-aad-msal provider component.AuthenticationContext object provided by react-aad-msal to authenticate the user and acquire and access token.The acquireTokenSilent will handle the token refresh.

By following this tutorial, you should now have a React application secured with Azure AD authentication and a .NET Core backend that validates access tokens. With this setup, you can build secure, authenticated applications that utilize Azure AD for identity management.
Copyright (c) 2023