Questions tagged [usermanager]
101 questions
3768
votes
11 answers
Proper use cases for Android UserManager.isUserAGoat()?
I was looking at the new APIs introduced in Android 4.2.
While looking at the UserManager class I came across the following method:
public boolean isUserAGoat()
Used to determine whether the user making this call is subject to…
Ovidiu Latcu
- 68,451
- 14
- 71
- 82
45
votes
7 answers
How to reset password with UserManager of ASP.NET MVC 5
I am wondering if there is a way to reset password with UserManager of ASP.NET MVC 5
I tried this with user that already has a password but no success. Any clue?
IdentityResult result = UserManager.AddPassword(forgotPasswordEvent.UserId.ToString(),…
DmitryBoyko
- 32,983
- 69
- 281
- 458
12
votes
1 answer
The property 'Claims' on type 'AspNetUser' is not a navigation property
I'm using ASP.NET Identity 2.2. I'm migrating the ASP.NET old membership to new Identity system. I am following the steps mentioned in this article for performing the migration.
I have extended IdentityUser and added few more properties like…
Dukhabandhu Sahoo
- 1,344
- 1
- 20
- 39
9
votes
2 answers
Override UserManager in django
How can I use a custom manager for the auth_user class in django?
In my django project, I'm using auth_user and I have a basic profile class. In every page of my site, I use some user and profile data, so every user query should join profile.
I…
Thibault J
- 3,906
- 28
- 40
7
votes
2 answers
Transactions with ASP.NET Identity UserManager
I'm trying to update a user.
AppUserManager appUserManager = HttpContext.GetOwinContext().GetUserManager();
AppUser member = await appUserManager.FindByIdAsync(User.Identity.GetUserId());
member.HasScheduledChanges =…
nmit026
- 2,328
- 19
- 45
5
votes
1 answer
.Net Core 1 Identity UserManager cached user list not updating
Environment: .Net Core 1, EF, using Identity for authentication, JWT tokens for authorization.
Running into an issue where using the UserManager.ChangePasswordAsync() method IS updating the database properly, but IS NOT updating the…
Kizmar
- 1,987
- 2
- 15
- 23
5
votes
0 answers
Request.GetOwinContext().getManager returns null when unit testing Account controller web api
I am trying to write some unit tests for my account controller web apis which make use of UserManager but I keep receiving null on the line in the title in the following section:
public ApplicationUserManager UserManager
{
get
…
CH15
- 53
- 1
- 6
4
votes
0 answers
How to Implement Two Factor Authentication Via Email in ASP.Net Core 2?
I am using ASP.NET Core 2.2 for a web server, In each time a user login to the website, after entering a correct email & password, I need to send a message containing a 4-digits PIN Code to user email, to use it as Email Two Factor Authentication,…
Hussein Dahir
- 117
- 1
- 8
4
votes
2 answers
ASP.NET Core 2.2 Create IdentityUser
Brand new to ASP.Net Core. Having to create an asp.net core 2.2 project with Identity (and have users seeded).
I can't find any documentation on how to do this exactly.
I was able to find the code to create Identity Roles (compiles anyway, haven't…
Owen
- 251
- 3
- 10
4
votes
2 answers
Asp.NET Identity Roles not working when attempting to add Role to User
I am currently adding Roles to our Database using the RoleManager with the CreateAsync(newRoleName) Method - which works correctly. But when I try to query that Role, it always returns that it doesn't exist (even though I can see it in the…
CodingRiot
- 105
- 2
- 7
4
votes
2 answers
How do set IdentityResult?
I'm in a situation where I need to validate a new (or updating) users' email address using some more complex rules.
I thought of using the User store that goes into the user manager but where and how does the IdentityResult get constructed?
Do I…
Volker
- 1,426
- 15
- 24
4
votes
1 answer
Updating AspNetUser Password Hash
I have 2 projects. One of them is using ASP.Net authentication, the other uses Windows authentication, which is the administration side. I want the Admin project to be able to manage the users of the other. I can modify everything except the…
sreimer
- 4,706
- 2
- 30
- 41
3
votes
0 answers
Password incorrect after upgrade to .net core
I'm using asp.net 4.6.1 using native UserManager to handle Register/Login flow. After upgraded to .net core 1.1, it appears that the hash algorithm has changed so users could not login using the old password.
For example, the password "P@ssword123"…
Le Huu HoangGia
- 89
- 9
3
votes
3 answers
ASP.NET Identity, multiple users with the same username, but belonging to different companies. Override FindAsync?
I'm new with MVC and EF, and I'm working on a project where I use Identity for user and role management. In the predefined login function from Visual Studio there's a function named FindAsync, used to get the user by username and password. In my…
Ken Q
- 1,043
- 1
- 13
- 23
3
votes
1 answer
UserManager.SendEmailAsync throws Message.Destination is null
Im trying to implement email confirmation for user registration using standard UserManager and EmailService.
For some reason while calling UserManager.SendEmailAsync(userId,"","") i have IdentityMessage.Destnation is null...
Here is my EmailService…
ArkadyB
- 1,114
- 1
- 15
- 34