asp.net-identity-3

Identity 3 SignInManager.PasswordSignInAsync() doesn't return any result

大憨熊 提交于 2020-12-29 13:13:47
问题 I am creating web application with Identity 3.0 and have problems with SignInManager PasswordSignInAsync() method. I'm using it just like in documentation, but it doesn't return anything ( application code just stop there ) Here`s my controller code: public class AppController : Controller { private IAccountService _service; private readonly SignInManager<User> _signInManager; private UserManager<User> _userManager; public AppController(IAccountService service, SignInManager<User>

Identity 3 SignInManager.PasswordSignInAsync() doesn't return any result

三世轮回 提交于 2020-12-29 13:13:26
问题 I am creating web application with Identity 3.0 and have problems with SignInManager PasswordSignInAsync() method. I'm using it just like in documentation, but it doesn't return anything ( application code just stop there ) Here`s my controller code: public class AppController : Controller { private IAccountService _service; private readonly SignInManager<User> _signInManager; private UserManager<User> _userManager; public AppController(IAccountService service, SignInManager<User>

Identity 3 SignInManager.PasswordSignInAsync() doesn't return any result

蹲街弑〆低调 提交于 2020-12-29 13:11:52
问题 I am creating web application with Identity 3.0 and have problems with SignInManager PasswordSignInAsync() method. I'm using it just like in documentation, but it doesn't return anything ( application code just stop there ) Here`s my controller code: public class AppController : Controller { private IAccountService _service; private readonly SignInManager<User> _signInManager; private UserManager<User> _userManager; public AppController(IAccountService service, SignInManager<User>

Password reset token provider in ASP.NET core - IUserTokenProvider not found

怎甘沉沦 提交于 2020-12-29 04:27:27
问题 Hello, I googled thoroughly but there is hundred examples from ASP.NET but nothing about ASP.NET Core. In order to getting password reset work I need to register an IUserTokenProvider instance into DI. Without it I get exception at following line: var result = await _userManager.ResetPasswordAsync(user, token, password); Exception "No IUserTokenProvider named 'PasswordResetTokenProvider' is registered." That makes sense so I tried to register it in the DI: services.AddSingleton

Password reset token provider in ASP.NET core - IUserTokenProvider not found

不问归期 提交于 2020-12-29 04:27:06
问题 Hello, I googled thoroughly but there is hundred examples from ASP.NET but nothing about ASP.NET Core. In order to getting password reset work I need to register an IUserTokenProvider instance into DI. Without it I get exception at following line: var result = await _userManager.ResetPasswordAsync(user, token, password); Exception "No IUserTokenProvider named 'PasswordResetTokenProvider' is registered." That makes sense so I tried to register it in the DI: services.AddSingleton

How to register custom UserStore & UserManager in DI

烂漫一生 提交于 2019-12-31 13:12:23
问题 Here is my setup: public class ApplicationUser : IdentityUser<Guid> { } public class ApplicationRole : IdentityRole<Guid> { } public class ApplicationUserLogin : IdentityUserLogin<Guid> { } public class ApplicationUserClaim : IdentityUserClaim<Guid> { } public class ApplicationRoleClaim : IdentityRoleClaim<Guid> { } Here is the definition of my UserStore public class ApplicationUserStore : UserStore<ApplicationUser, ApplicationRole, MyContext, Guid> { public ApplicationUserStore(MyContext

How can I change the table names used by asp.net identity 3 (vnext)?

微笑、不失礼 提交于 2019-12-29 07:48:09
问题 The method used in asp.net identity 2 to alter the identity table names does not work in asp.net identity 3. 回答1: You can do this easily by changing the entity mapping with extension method ToTable("TableName") on OnModelCreating of your DbContext : And you don't need to use .ForSqlServerToTable() , just .ToTable() should work in any database. protected override void OnModelCreating(ModelBuilder builder) { base.OnModelCreating(builder); builder.Entity<User>().ToTable("Users"); // Your custom

OpenIdConnect access_token size and accessing claims server side

倖福魔咒の 提交于 2019-12-24 02:55:40
问题 I am trying to wrap my head around several concepts here but I don't want this question to be too broad - basically what we are trying to do is use role claims as permissions to lock down our API but I am finding that the access_token is becoming too big. We are using OpenIddict and ASP.NET Identity 3 on the server side. We have implemented the default AspNetRoleClaims table to store our claims for each role - using them as permissions. We lock down our API endpoints using custom policy based