This repository contains a React SPA supported by an ASP.NET Core backend to implement authentication and authorization with Auth0 through the Backend For Frontend (BFF) pattern.
The following article describes the implementation details: Backend For Frontend Authentication Pattern with Auth0 and ASP.NET Core
- Clone the repo:
git clone https://github.com/auth0-blog/bff-auth0-dotnet.git
. - Move to the
bff-auth0-dotnet/Api
folder. - Add the Auth0 domain and audience for your API to the
appsettings.json
configuration file, as described in the Create an API in the Auth0 Dashboard subsection. - Move to the
bff-auth0-dotnet/BFF
folder. - Add the Auth0 credentials for your Regular Web Application to the
appsettings.json
configuration file, as described in the Create an application in the Auth0 Dashboard subsection. - While in the
bff-auth0-dotnet/BFF
folder, typedotnet run
in a terminal window to launch the web application. - Point your browser to
https://localhost:5001
to interactively test your application.
- .NET Core 5.0 installed on your machine.
- An Auth0 account.