Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UpdateUserAsync not properly saving data in Hosted Service #121

Open
pippinmole opened this issue Feb 22, 2022 · 1 comment
Open

UpdateUserAsync not properly saving data in Hosted Service #121

pippinmole opened this issue Feb 22, 2022 · 1 comment
Assignees

Comments

@pippinmole
Copy link

Describe the bug
When setting the username of a user, updating it (through userManager.UpdateUserAsync(user)), the user data is not stored. This is clearly shown in the screenshot where I get the user straight after, to which the names do not match, but sometimes they do?

image

It is worth noting I am using Cronos, a cron-style scheduling package that allows me to run background tasks every period of time.

To Reproduce
Steps to reproduce the behavior:

  1. Register a Cronos job inheriting from the CronJobService
  2. Inside DoWork, await a delay and try and update the user
  3. Observe the property you update not reliably being updated

Expected behavior
User gets updated every time the method is called and awaited

Screenshots

image
image
image

Environment (please complete the following information):

  • .NET 6
  • AspNetCore.Identity.Mongo v8.3.3
    image

Additional context
Add any other context about the problem here.

@vova3211 vova3211 self-assigned this Feb 22, 2022
@pippinmole
Copy link
Author

It may be worth noting that if I change the IAppUserManager (my interface) to UserManager (MongoDB .NET library), it still produces this error, as shown in the images below

image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants