I'm creating a service that will have Asp.Net Core as a backend, angular as a frontend. I'm testing several things on the different templates that microsoft provides for the SPA.
So I created one with this command with .Net core 5 cli:
dotnet new angular -au Individual
Seems to work, but my understanding is that when I need to redirect the user to the loading page(because not connected or not enough rights), I will get redirected to the UI of a page of Asp.Net Core.
I've seen that I can customize this page(well, create a scaffolded version and customize it), but it still worries me:
- This might make several back/forth between the angular app and a razor page
- The design of our app is that the Asp.Net server is only providing an API and the static files of the angular app, so having suddently some pages served directly from the asp.net server seems wrong.
- I'm using an angular library for all the theming/styling of my button, checkbox, header, have the material style, ... It seems cumbersome to have to recreate all those style a second time for the login pages.
- I will have some external hardware device that will connect to this API, so I think that anyway they should be able to do everything without using the asp.net razor pages provided for the login.
So my question, how to authenticate against an Asp.Net core server that is using the asp.net core identity?