I am trying to build multi layered web app, users can access via google auth or ldap acc.
It has:
- Core Layer (Library - All models)
- Data Access Layer (Library)
- Business Logic Layer (Library)
- API Layer (.Net Core Web API)
- Web Layer (.Net Core MVC Project)
When a user login into the web site, I have to use same authentication both MVC and API.
Should I use aspnet identity for login (with auto generated user db), how can pass the authentication to API project?
Or is there a way when google aut or ldap login is successful then I can create Bearer token (or something like that) and use it both MVC and API projects as authenticated login?
PS: I work on .net core 2.2