Questions tagged [asp.net-identity]
The ASP.NET Identity system is designed to replace the previous ASP.NET Membership and Simple Membership systems. Use the ASP.NET Core Identity tag for questions about Identity in ASP.NET Core.
asp.net-identity
9,039 questions
1
vote
1
answer
563
views
How to make redirect after logout using OpenIddict?
I have logout endpoint that invalidates user token and should perform redirect to login page after logging user out
...
0
votes
1
answer
474
views
Using .NET 8 Identity Endpoints Cookie to authorize another application
I am working on creating an identity microservice using the .NET Identity platform and the new Identity API endpoints. I have 3 separate applications that I am using for testing of the service: An ...
0
votes
1
answer
46
views
Can an AppUser : IdentityUser get linked to an Employee-entity while keeping separation of concerns with Dependency inversion in Clean architecture
I have chosen to define ApplicationUser class like this in the infrastructure-layer:
...
1
vote
0
answers
224
views
How to implement JWT authentication insted of cookie in dot-net-core-8?
Is it possible to have only jwt authentication instead of cookie auth and how in dot-net-core 8 ?
0
votes
1
answer
166
views
Problem mapping OIDC and OAuth 2.0 concepts to my application
I am trying to implement an SSO server so that my ASP.NET Core MVC applications can:
Authenticate users with the SSO server
Get the user's roles and claims from the SSO server
Every T minutes I want ...
0
votes
1
answer
114
views
How does one control access to third party weak-security website from an asp.net.identity App?
How can I control access to a 2nd website from an ASP.net core website, both running on the same IIS 10 server?
My team is implementing a "gateway" or "wrapper" ASP.net core C# app ...
0
votes
0
answers
34
views
Identity server 4 redirect when project removed
In the past I have sued identity server 4 as the identity provider. Now, i have deleted the identity project from my solution, removed every mention on the identity url from my solution and also ...
0
votes
1
answer
309
views
How are user logins from different devices managed in Asp.net core Identity? (Token-based authentication)
The user needs to login in multiple devices. Each login creates a session with its own token and refresh token. The tokens are stored in the database and then each token the api receives is validated ...
0
votes
1
answer
81
views
Claims Identity Not Authenticated After SignInAsync
I'm using Cookies Authentication, but after User Validate there is validated true.
screenshot.
But after Login, there is shown User Identity not Authenticated screenshot.
Here I mention Code snippet ...
0
votes
1
answer
43
views
404 NOT FOUND error when calling endpoint with required claim
I have the following setup:
...
1
vote
1
answer
225
views
How do you avoid an infinite redirect loop when combine two different authentication schemes (openIdConnect and ASP.NET Identity)?
I am currently working on a login system where a user has the option to login with either their organization email (AD authentication) or regular email and password as shown below:
Before adding ...
0
votes
1
answer
208
views
Allow admin to impersonate a tenant in a multi-tenant application which uses ASP.NET Identity
I have a multi-tenant application which has Tenant users (identified by the roles TenantSupport and TenantTechnical) and Admin ...
0
votes
0
answers
180
views
Blazor Server EditForm requires either a Model parameter, or an EditContext parameter, please provide one of these
I'm receiving this error: "EditForm requires either a Model parameter, or an EditContext parameter, please provide one of these."
But I'm providing an (initialized) Model parameter to the ...
0
votes
0
answers
271
views
How can I prohibit access to certain generated .NET8 Identity endpoints?
I have created an ASP.NET Core 8 MVC web application and scaffolded Identity on to it, only accepting a few pages (Login, Registration, Forgot Password, etc).
What I've discovered with some research ...
0
votes
0
answers
71
views
ASP.NET Identity : ExpireTimeSpan at server not working
I used ASP.NET Identity and at this time have a problem.
My problem is that ExpireTimeSpan is not working at the server.
My Program code is
...
-1
votes
1
answer
174
views
An unhandled exception occurred while processing the request. NullReferenceException
An unhandled exception occurred while processing the request.
NullReferenceException: Object reference not set to an instance of an object.
AspNetCoreGeneratedDocument....
0
votes
1
answer
43
views
AccessToken lifetime should be different for UI users and API clients
I'm using authorization code flow to login UI users and client credentials to login API clients.
AccessToken lifetime should be few minutes for UI users but few hours for API clients.
I'm using ...
1
vote
0
answers
82
views
I'm encountering an issue sending notifications to specific users using Angular and SignalR
Notifications to all users work successfully.
When I use Clients.All:
when i use Clients.All
However, when I try to send notifications to specific users, I see a success message, but the notifications ...
0
votes
1
answer
55
views
How to implement IdentityRole with custom properties into UserManager?
My IdentityRole:
...
0
votes
0
answers
279
views
How can UserName’s ProtectedPersonalData attribute be overridden in ASP.NET Core Identity?
I’m using ASP.NET Core Identity in a Blazor project. I’d like to encrypt the user’s personal data, however, I don’t want to encrypt the UserName. My plan is to use ...
0
votes
0
answers
155
views
Locking users out for a VERY long time (permanently) in .Net Core
We are migrating an application from Webforms to ASP.Net Core 6 and I'm trying to emulate the bit isLocked in the membership framework by providing a large value for the DefaultLockoutTimeSpan:
...
0
votes
2
answers
1k
views
ASP.NET Core MVC pass a url parameter to the POST
I have a Blazor Server app. It uses the ASP.NET Identity Library which is ASP.NET Core MVC. I am trying to pass a parameter to register so a URL like ...
1
vote
0
answers
94
views
Resolving Time Difference Issue in SQL Server and .NET
I'm encountering an issue with time differences in my SQL Server environment and I'm seeking advice on how to resolve it. Here's a brief overview of the problem:
Problem Description:
I have a scenario ...
0
votes
1
answer
76
views
How can I configure asp net core authorization to find the user's roles from my custom DB schema?
I've got SQL Server tables Users, Roles and SecurityGroups, each containing an integer ID and a NVARCHAR Name. I also have mapping tables User_SecurityGroup and SecurityGroup_Role. A user can be in ...
0
votes
0
answers
30
views
How to get IdentityUser name using SqlDataReader
I have this model:
...
1
vote
0
answers
76
views
Problems at login
I have this login process (some parts will be omitted):
Index.cshtml.cs (Login):
...
0
votes
2
answers
96
views
Asp.net Identity JWT Issue
I have tried to implement JWT token authorisation into my system but it's not working. I'm new to ASP.net so please go easy on me.
I can login fine and i do get the token as expected. But when I try ...
0
votes
0
answers
78
views
Extending ApplicationUser on a fresh Blazor Server-only project with Individual accounts
I'm trying to extend ApplicationUser with custom properties on a fresh Blazor server project. Here's what I have:
...
0
votes
0
answers
52
views
Blazor frontend with Authentication enabled bombs when a password change is executed
I am developing a web app that contains a Blazor front end and a .net WebAPI backend. Both are developed using the .NET 8 version. I also have a class library project where I have all the data ...
0
votes
2
answers
503
views
How to enable to select culture with both url and cookie in asp.net core razor and blazor pages?
I have applied Localization in my asp.net core mvc project.
It includes blazor pages for Identity.
I want to enable to change the culture by changing the site url's culture part.
domain/en/Home/Index
...
0
votes
1
answer
55
views
Multiple authentication Identity - JWT
I have a project where the web is authenticated with an identity and I want to use JWT for APIs. What changes should I make to use both at the same time?
...
0
votes
1
answer
309
views
Getting ApplicationUser in BlazorServer page
I'm trying to access ApplicationUser of current logged-in user in Blazor Server .NET 8 app. I've added a new page in /Account/ISP called Index.razor
...
0
votes
1
answer
466
views
How to redirect from an Asp.Net Core MVC controller to a login page written in Razor page
I am new to Asp.Net Core MVC. I have created an MVC application in .Net Core 6.0. When I scaffolded the Identity, it created it in Razor pages. Once the user enters the login credentials, the Login ...
0
votes
0
answers
63
views
Update Role In asp.net core Idntity
I Use Microsoft.AspNetCore.Identity.EntityFrameworkCore in my project
When I try to update the user role I get the following error
InvalidOperationException: The instance of entity type 'RoleEntity'
...
0
votes
0
answers
74
views
Microsoft ASPNet Identity Owin PasswordSignInAsync not working when accessing site with IP Address of IIS Server
I am having an issue when trying to login to our ASP.NET MVC application. It works if I pull up a browser on the server and utilize localhost. When I use the IP Address of that server, it continues to ...
0
votes
1
answer
362
views
UserManager.GetClaimsAsync() failing - The connection is closed
In a Blazor InteractiveServer application, using the ASP.NET Identity Library, I call:
Microsoft.AspNetCore.Identity.UserManager`1.GetClaimsAsync(TUser user)
I set it to use my extension class by ...
4
votes
0
answers
990
views
How to decode ASP.NET Core 8 Identity token on the client side?
ASP.NET Core 8 Identity produces a token that is NOT JWT!
The tokens aren't standard JSON Web Tokens (JWTs). The use of custom tokens is intentional, as the built-in Identity API is meant primarily ...
3
votes
1
answer
2k
views
Headers are read-only, response has already started on Blazor Server SignInManager PasswordSignInAsync
This is my login page:
...
1
vote
2
answers
205
views
The AspNetUserRoles table was cleared during migrations
I'm developing a website with ASP.NET Core 8 Web API, SQL Server, utilizing the identity framework. The database contains various tables such as AspNetUsers, AspNetRoles, AspNetUserRoles, Brands, and ...
1
vote
1
answer
449
views
System.InvalidOperationException: No sign-out authentication handler is registered for the scheme
I have simple api setup with Asp Identity , the login, create and 2fa routes are working fine, but when i try to call sign out I am getting the following error response
System....
0
votes
0
answers
59
views
How to remove PasswordHash Autogeneration when seeding Identity NET CORE
I'm seeding the User identity table using EF core configurations, this is my method.
...
1
vote
0
answers
207
views
The seed entity for entity type 'IdentityUser' cannot be added because no value was provided for the required property 'Id' when seeding default users
I'm trying to seed 2 default users (admin & standard user) using data migrations and I'm getting an error with the Id property of the IdentityUser entity. This is the code I'm using:
...
1
vote
1
answer
153
views
How can run the IdentityServer for Macos?
I am developing a project, it is requested to use IdentityServer4. I install the project but I can't run it because it doesn't support .net 3.1 on Macos operating system.
I did some research, I found ...
0
votes
1
answer
84
views
Didn't find Login page without declaration of _Layout in asp.net core mvc 6,7
I've a fully custom _Layout page in location "~/Views/Shared/".
...
0
votes
1
answer
203
views
UserManager.GetUserAsync returns a null
I have two projects. Project 1 is a VB project, and Project 2 is a .NET Core MVC project.
Project 1 sends data to Project 2. Based on the data that it receives, it creates a new identity user in the ...
0
votes
0
answers
229
views
Is there any way to integrate the new .NET 8 Identity API endpoints with the Microsoft Identity Platform (Azure AD B2C)?
I have recently been spending some time learning the new Identity endpoints that have been added to ASP.NET Core Web APIs as part of .NET 8. I am currently trying to develop a .NET MAUI application ...
0
votes
1
answer
35
views
"Correlation failed." after upgrading 'Microsoft.IdentityModel.JsonWebTokens' and 'System.IdentityModel.Tokens.Jwt'
After upgrading packages Microsoft.IdentityModel.JsonWebTokens and System.IdentityModel.Tokens.Jwt the service returns message <...
0
votes
1
answer
77
views
how I can manage the users permission to access the pages in ASP web application when using External API
I have a front-end project where I get all the data from an External API. How I can manage users permission to access the app pages?
When the user logs in, I get the bearer token and a list of user ...
0
votes
1
answer
127
views
How to use custom user with ASP.NET identity user manager?
I have a custom application user created which I'm using in my identity stores/user managers/etc. but no matter what I do it continues to try to utilize AspNetUsers ...
0
votes
1
answer
548
views
Can I force AuthenticationState to refresh (when claims have changed)?
Is there any way to force the AuthenticationState to re-read the database when claims have changed?
I've implemented a ServerAuthenticationStateProvider and it ...