Skip to content

Instantly share code, notes, and snippets.

@alfredodev
Created June 22, 2018 11:48
Show Gist options
  • Save alfredodev/22edfe32f298210e968b4b8e1077b5a8 to your computer and use it in GitHub Desktop.
Save alfredodev/22edfe32f298210e968b4b8e1077b5a8 to your computer and use it in GitHub Desktop.
services.TryAddScoped<IUserValidator<ApplicationUser>, UserValidator<ApplicationUser>>();
services.TryAddScoped<IPasswordValidator<ApplicationUser>, PasswordValidator<ApplicationUser>>();
services.TryAddScoped<IPasswordHasher<ApplicationUser>, PasswordHasher<ApplicationUser>>();
services.TryAddScoped<ILookupNormalizer, UpperInvariantLookupNormalizer>();
services.TryAddScoped<IRoleValidator<IdentityRole>, RoleValidator<IdentityRole>>();
services.TryAddScoped<IdentityErrorDescriber>();
services.TryAddScoped<ISecurityStampValidator, SecurityStampValidator<ApplicationUser>>();
services.TryAddScoped<ITwoFactorSecurityStampValidator, TwoFactorSecurityStampValidator<ApplicationUser>>();
services.TryAddScoped<IUserClaimsPrincipalFactory<ApplicationUser>, UserClaimsPrincipalFactory<ApplicationUser, IdentityRole>>();
services.TryAddScoped<UserManager<ApplicationUser>>();
services.TryAddScoped<SignInManager<ApplicationUser>>();
services.TryAddScoped<RoleManager<ApplicationUser>>();
services.TryAddScoped<IUserStore<ApplicationUser>, UserStore<ApplicationUser, IdentityRole, UsersDbContext>>();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment