I have an ASP.NET Core MVC project where users should be authenticated / authorized to gain access to their profiles. There will be a login view.
The users database resides on a separate server.
Can the ASP.NET Core MVC project call a separate API to perform the authentication / authorization instead of letting ASP.NET Core MVC directly access the users database?
How does the API do the authentication and return a result?
I would appreciate your guidance. Maybe a link to an example?
You can google and search JWT authentication in Asp.net Core application. It will show how to create JWT Token.
Besides, these are some good answers you can refer to: JWT Validation on separate web Api and calling the API method using HttpClient