I have a WebAPI app which I'm using a 3rd party authenticator (Firebase authentication).
I have the authentication working but once the user has logged into my server, I'd like to save credentials and user data into my ASP.NET Identity tables.
I seem to be able to use the UserManager to create accounts if I call this line in my Startup.cs file
services.AddIdentityCore<ApplicationUser>()
.AddEntityFrameworkStores<ApplicationDbContext>();
This allows me to add UserManager in my constructor without adding all the login pages and the default cookie authentication scheme I'd normally get if I called AddIdentity()
However, when I add SignInManager in my constructor like this
public ValuesController(SignInManager<ApplicationUser> signInManager)
I still seem to be getting this error.
An unhandled exception has occurred while executing the request. System.InvalidOperationException: Unable to resolve service for type 'Microsoft.AspNetCore.Identity.SignInManager`1[mvcWithAuth.Data.ApplicationUser]' while attempting to activate 'testWebAPIFB.Controllers.ValuesController'.
This seems to mean that AddIdentityCore doesn't add SignInManager. How do I add SignInManager as a class to be dependency injected?