2

I have an external web service which holds the user data & I need to use that to log user in. I would like to use existing AccountController + UI views if possible. I tried adding custom SignInManager class to override PasswordSignInAsync as below.

public class MySignInManager<ApplicationUser> 
: SignInManager<ApplicationUser> where ApplicationUser : MyModels.ApplicationUser

But it fails due to missing EF database which stores user information. I do not need EF database since this external web service will be my data source.

I read I need to implement UserManager & UserStore but could not find samples with ASP.NET Core release. Could someone point me to that?

SamJackSon
  • 1,071
  • 14
  • 19
  • Just implement the `IUser*` interfaces (depending on which features you want your store to support), then register it with the IoC container (like Identity does with EntityFramework here https://github.com/aspnet/Identity/blob/5480aa182bad3fb3b729a0169d0462873331e306/src/Microsoft.AspNetCore.Identity.EntityFrameworkCore/IdentityEntityFrameworkBuilderExtensions.cs#L45-L61) – Tseng Nov 07 '16 at 01:41

1 Answers1

0

I found this implementation - Aspnet Core Identity Without Entityframework

Source code on Github

I think this should be good enough to start with.

SamJackSon
  • 1,071
  • 14
  • 19