Questions tagged [usermanager]

122 questions
0
votes
0 answers

ASP.Net Core 3.0 UserManager UpdateSecurityStampAsync Optimistic concurrency failure, object has been modified

Any idea what's the purpose of UserManager.UpdateSecurityStamp? I call it every time a user logs in to my ASP.Net Core 3.0 application and occasionally gets Optimistic concurrency failure, object has been modified. Any advice and insight is…
0
votes
0 answers

ASP.NET Core user manager problem in setting RefreshToken via user manager

I have this web api method in ASP.NET Core: [HttpPost("Refresh")] public async Task Refresh([FromBody]TokenRefreshDto tokenRefreshDto) { var principal =…
0
votes
0 answers

How to implement UserStore.GetClaimsAsync method

I have a custom user store that implements IUserClaimStore. That way, I need to implement GetClaimsAsync method, but I am stuck here. This is my current implementation: public Task> GetClaimsAsync(T user) { return…
jstuardo
  • 3,901
  • 14
  • 61
  • 136
0
votes
1 answer

Identity email verification not working after GenerateChangePhoneNumberTokenAsync() called

I am recently getting an error "Invalid token" when verifying email using asp.net identity. I have elaborate flow as below: Whenever user signup then the system will send an email for verify account. string emailConfirmationToken = await…
SadikAli
  • 594
  • 1
  • 4
  • 21
0
votes
0 answers

How to get the method from the system service?

Need method following methods userCreate(string, int) createGuest(string, int) from UserManager class I have created instance for the class but it not working UserManager userManager = (UserManager)…
0
votes
1 answer

AspNetIdentity login fails on Azure - Format of the initialization string does not conform to specification starting at index 0

DISCLAIMER : Even if this error has been asked in a lot of topics before, I didn't find an anwser to my question ; please feel free to answer it before flagging as duplicate, 'coz it's not a duplicate :-) I use Identity Framework in an ASP.NET MVC5…
0
votes
1 answer

Android ContentProvider and Service in Multi-User Devices

In a multi-user Android device and when we switch to other secondary user (either using Ui or programmatically), does Android keep any of Primary user components alive , for example started ContentProviders or background Services
issamux
  • 1,336
  • 1
  • 19
  • 35
0
votes
1 answer

Using Microsoft.AspNetCore.Identity.MongoDB for Multi Tenancy. How do we inject dynamic Tenant into MongoDbContext

Does anyone know how we can inject context into User Manager > MongoDB serStore at runtime in .net core 2.0. We cannot do this at startup due to the context being dynamic but the UserStore is not accessible and UserManager has too many variables to…
Dom
  • 1
  • 2
0
votes
2 answers

Microsoft Identity Custom User, Role, Claim Inheritance

Hi guys i'am trying to inherit from the standard AspNet tables. My intention was to use Guid as Primary key and extendig the basic AspNetUser with some Properties. Furthermore I wanted to rename the table names. Right now it is like: public class…
0
votes
0 answers

Unable to link model to account in a single action

I have the following code in a user register action: var userStore = new UserStore(db); var userManager = new UserManager(userStore); var user = new ApplicationUser() { UserName = model.email, Email =…
trees_are_great
  • 3,881
  • 3
  • 31
  • 62
0
votes
0 answers

ASP.NET Identity , how to expire token programmatically?

I have a scenario like , When something change on User like CompanyId or User's BirthDay changed , I want to expire or invalid User Token and than generate new token. How can I do that with ASP.NET Identity Framework. Thanks.
sercanD
  • 187
  • 1
  • 13
0
votes
1 answer

UserManager used with different stores (UserStore, UserEmailStore, UserClaimStore, UserLockoutStore etc.)

I am trying to implement UserStore but I would like also to implement UserEmailStore and UserLockoutStore and the others. As I noticed all User*Store are based on UserStore, no problem. But I took a look into UserManager and I found, for me, strange…
Lukas Dvorak
  • 481
  • 4
  • 15
0
votes
2 answers

How to get UserID from Microsoft.AspNetCore.Identity in a non controller class

Hoping someone can help me out here. I'm new to ASP, MVC and C# but trying to build a web application to learn it. I've created the default application that creates all the controllers, views etc for users and all works well. I've now created a…
Stephen Clay
  • 107
  • 7
0
votes
0 answers

Change Password in UserManager(Asp.Identity) c#

Please suggest best practice to update new password in Database through UserManager in Asp.Identity Currently I am using below approach to update password. Is this enough or I want to use different approach? ApplicationDbContext context = new…
user6522678
0
votes
1 answer

FOS UserBundle User Manager - login after updateUser

I would like to ask whether the package Fos UserBundle when you add a user, you can log it with the user manager? If so, in what way? $userManager = $this->container->get('fos_user.user_manager'); $user = $userManager->createUser(); $user ->…
ciurciurek
  • 112
  • 1
  • 8
1 2 3
8 9