I am working on .Net Core Project now I need AuthenticationManager for interface IAuthenticationManager
According to Microsoft this has obsolote.
To get ApplicationSignInManager I have this method
private ApplicationSignInManager getSignInManager(ApplicationUserManager manager, IAuthenticationManager auth)
{
return new ApplicationSignInManager(manager, auth);
}
ApplicationSignInManager
public class ApplicationSignInManager : SignInManager<ApplicationUser, string>
{
public ApplicationSignInManager(ApplicationUserManager userManager, IAuthenticationManager authenticationManager)
: base(userManager, authenticationManager)
{
}
public static ApplicationSignInManager Create(IdentityFactoryOptions<ApplicationSignInManager> options, IOwinContext context)
{
return new ApplicationSignInManager(context.GetUserManager<ApplicationUserManager>(), context.Authentication);
}
}
This does work in Mvc project due to CreatePerOwinContext which is called using
app.CreatePerOwinContext<ApplicationSignInManager>(ApplicationSignInManager.Create);
But how can I activate this class in .Net Core?
Have also learned here that this CreateOwinContext is obsolote in .Net core here but can't figure out how to call create method of ApplicationSignInManager ?