127 questions
0
votes
0
answers
42
views
Does ASP.NET Identity have a method that allows for batch creation of users using UserManager?
I am implementing a method that receives data from an API. At the moment, the API is adding the data to the database by using a loop. This however is looking more and more unreliable as the data keeps ...
0
votes
1
answer
70
views
Is there any difference in security between UserManager.FindByEmail and UserManager.Users.SingleOrDefault?
Initially I was using:
var user = await _userManager.FindByEmailAsync(email);
and now I'm using:
var normalizedEmail = _userManager.NormalizeEmail(loginDto.Email);
var user = await _userManager....
3
votes
3
answers
261
views
How do I extend or override UserManager.FindByEmail() to have it return only what I want?
My login method is below and you'll see I have to call my user again after I fetch it with _userManager.FindByEmailAsync() because there are a couple of fields Points and Tokens that are calculated as ...
0
votes
0
answers
79
views
UserManager: GenerateEmailConfirmationTokenAsync() Invalid Token
I have gone through most posts on this topic, none seem to help/work, so resorting to posting my own question...
Scenario: In my ASP.net App I have a setting where I allow the user to enable or ...
0
votes
0
answers
48
views
MudBlazor OnInitializedAsync parallel execution AspNetCore UserManager
I have an issue with MudBlazor and ASP.NET Core UserManager.
In my application, I have a profile menu dropdown in the top right corner. When I click on "Edit Profile", I get routed to my ...
0
votes
2
answers
150
views
How to inject userManager inside the DbContext constructor?
I'm using IdentityDbContext and I have a SeedData class that I'm using inside the OnModelCreating method to seed the database using the initial migrations as follows:
protected override void ...
0
votes
0
answers
150
views
create user in aem with user manager api from java application
I want to create a user in aem with user manager api from Java application. I have used the below code for connectivity aem.
Repository myRepo = JcrUtils.getRepository(path);
javax.jcr.Session ...
0
votes
1
answer
81
views
Blazor .NET 8 LINQ vs Async Function
Which one is better to use and why?
ApplicationUser? user = await _userManager.FindByIdAsync(userId);
ApplicationUser? userOne = _userManager.Users.Where(u => u.Id == userId).Single();
Return a ...
1
vote
1
answer
639
views
Setting up asp.net Razor page UserManager for Dependency Injection
I understand UserManager for an asp.net Razor page is defined via dependency injection and so I have a page as follows:
public class SetupModel : PageModel
{
public SetupModel(UserManager<...
4
votes
0
answers
484
views
Django, MyPy: Incompatible types in assignment (UserManager)
I have following errors when I am running mypy checking:
error: Cannot override class variable (previously declared on base class "User") with instance variable [misc]
error: Incompatible ...
-2
votes
1
answer
1k
views
Using UpdateAsync method of UserManager throws InvalidOperationException on EntityFrameworkCore
I am in the process of updating a dotnet Framework project to dotnet Core. I have a UserProfileService class to handle all the users. This had a UserManager which is injected using the dotnet core ...
0
votes
0
answers
30
views
Getting error when trying to run application related to UserManager, IdentityRole etc
Getting error InvalidOperationException: Unable to resolve service for type 'Microsoft.AspNetCore.Identity.UserManager`1[Microsoft.AspNetCore.Identity.IdentityUser]' while attempting to activate '...
0
votes
0
answers
55
views
ASP.NET Core usermanger is not saving user roles to AspNetUserRoles table
This is my code - startup.cs:
services.AddDbContext<AuthDBContext>(options =>
options.UseSqlServer(Configuration.GetConnectionString("DefaultConnection")));
services....
0
votes
0
answers
40
views
Usermanager, invalid token
I have this method:
public async Task<string> Handle(GenerateRecoveryLinkQuery request, CancellationToken cancellationToken){
var user = await _userManager.FindByNameAsync(...
1
vote
1
answer
2k
views
How to use ASP.NET Core Identity UserManager<ApplicationUser> through static method to get Identity User data from DB
I have created an API (ASP.NET core 6) and I have also used Identity framework for user management.
Admin can make users active or inactive. so I want to check if the user is active or not
in each API ...