added
but navigation not worked with html5 mode true
How can I assign the ‘EmailService’ property on the UserManager to the ‘EmailService’ class Can I extend the UserManager : AbpUserManager<Tenant, Role, User> in IdentityConfig?
ex: /***************************************/ public class ApplicationRoleManager : RoleManager<IdentityRole> { public ApplicationRoleManager(IRoleStore<IdentityRole,string> roleStore) : base(roleStore) { }
public static ApplicationRoleManager Create(IdentityFactoryOptions<ApplicationRoleManager> options, IOwinContext context)
{
return new ApplicationRoleManager(new RoleStore<IdentityRole>(context.Get<ApplicationDbContext>()));
}
}
public class EmailService : IIdentityMessageService
/***********************************/
I need to GenerateEmailConfirmationTokenAsync, and must implement IUserTokenProvider. I drive class UserManager : AbpUserManager<Tenant, Role, User>, IUserTokenProvider<User, long>
implememted the interface public Task<string> GenerateAsync(string purpose, UserManager<User, long> manager, User user) { Guid resetToken = Guid.NewGuid(); user.PasswordResetToken = resetToken; manager.UpdateAsync(user); return Task.FromResult<string>(resetToken.ToString()); }
public Task<bool> IsValidProviderForUserAsync(UserManager<User, long> manager, User user)
{
if (manager == null) throw new ArgumentNullException();
else
{
return Task.FromResult<bool>(manager.SupportsUserPassword);
}
}
public Task NotifyAsync(string token, UserManager<User, long> manager, User user)
{
return Task.FromResult<int>(0);
}
public Task<bool> ValidateAsync(string purpose, string token, UserManager<User, long> manager, User user)
{
return Task.FromResult<bool>(user.PasswordResetToken.ToString() == token);
}
added a property PasswordResetToken to User : AbpUser<Tenant, User>
But get Error, DbContext' context has changed since the database was created. Could you explain how to implement IUserTokenProvider, for usermanager