1

I have the following context:

  1. A Asp.NET MVC 5 web app that is client.

  2. A Web API which communicates with Custom Db (Where Users table is located).

In the AccountController.cs , there is the method Login which uses SignInManager.PasswordSignInAsyn call .

I know I need to use an HttpClient to call the Web API "/Token" url to get the bearer token to be used, when getting API resources, and that this token can be stored in a cookie.

What I need here is make the client web app know that user is logged in. Where should I place this logic (httpClient calling web api to validate user) to make my client web app behaves like the user is authenticated (display email in top menu, access to [Authorize] controller methods, redirect to login page, all this in client web app). ?

Alberto Montellano
  • 5,886
  • 7
  • 37
  • 53

0 Answers0