This is a demo app based on auth0 SPA Angular quickstart. It is integrated with a .Net Core 3.1 backend. The purpose is to demonstrate how to use auth0 to secure Api calls to a NetCore31 app from an Angular 8+ SPA.
To make it work you need to:
- Have an auth0 subscription.
- Create an Application and an API.
- Edit following files with your auth0 configuration info:
- \auth0-backend-demo\appsettings.config
- \auth0-angular-demo\src\app\auth.service.ts
- In the angular app install the npm packages:
cd .\auth0-angular-demo
npm install - start the angular app: npm start
- Compile and run the .NetCore Api app:
cd .\auth0-backend-demo
dotnet restore dotnet run - Open your browser and navigate to http://http://localhost:3000/
To better understand how to configure your app I recommended to complete the auth0 angular2 quickstart.