The third release of the ASP.NET Identity system which was designed to replace the previous ASP.NET Membership and Simple Membership systems. Use this tag if your question deals specifically to ASP.NET Identity 3 features. The [asp.net-identity] tag should be used if your question is not specific to ASP.NET Identity 3.
Questions tagged [asp.net-identity-3]
225 questions
15
votes
3 answers
How to register custom UserStore & UserManager in DI
Here is my setup:
public class ApplicationUser : IdentityUser
{
}
public class ApplicationRole : IdentityRole
{
}
public class ApplicationUserLogin : IdentityUserLogin
{
}
public class ApplicationUserClaim :…

JuChom
- 5,717
- 5
- 45
- 78
14
votes
3 answers
Why this violates the constraint of type parameter 'TUser'?
I am trying to customize asp.net identity entities with the following ones:
public class User : IdentityUser
public class UserClaim : IdentityUserClaim
public class UserLogin :…

Lorenzo
- 29,081
- 49
- 125
- 222
14
votes
2 answers
Update Claims values in ASP.NET One Core
I have a Web Application in MVC 6 (Asp.Net One Core), and I'm using Claims based authentication. In the Login method I set the Claims:
var claims = new Claim[]
{
new Claim("Name", content.Name),
new Claim("Email", content.Email),
new…

Martín
- 3,105
- 7
- 25
- 43
12
votes
2 answers
Create claims identity in Identity 3
Visual Studio 2015 scaffolding uses UserManager which cannot be used to create ClaimsIdentity. Does anyone have a working example on how to do this?
The VS2015 scaffolding throws errors:
public async Task…

Ungaro
- 522
- 6
- 15
11
votes
2 answers
How to set the cookie validateInterval in ASP.NET Core?
I'm trying to set the validateInterval for an ASP.NET 5 RC1 application which makes use of ASP.NET Identity 3
I am trying to implement the code in this answer.
there are many code sample like this answer but it seems it isn't valid in ASP.NET 5…

greay
- 1,725
- 5
- 18
- 37
11
votes
2 answers
Identity 3.0 Getting a user by id when the id is "int"
I have had a look around for answers on this for Identity 3.0 and found little regarding getting a single user that has an int id.
I have an asp.net-core mvc6 project in which I have converted all users and roles with string id's to have integer…

si2030
- 3,895
- 8
- 38
- 87
11
votes
7 answers
Get short claim type name
I am using Asp.Net Core and ASP.NET Identity and when I get a Claim type I get something like
"type":"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier",
"value":"123"
How to get only the simple type name,…

Miguel Moura
- 36,732
- 85
- 259
- 481
10
votes
1 answer
What is the different between System.IdentityModel.Tokens & Microsoft.IdentityModel.Tokens? Which one should I use in an ASP.NET Core application?
We can find two separate packages in the NuGet gallery:
System.IdentityModel.Tokens.Jwt
Microsoft.IdentityModel.Tokens
Both seem to receive regularly updated and have millions of downloads.
I know that System.IdentityModel.Tokens.Jwt has a…

Tohid
- 6,175
- 7
- 51
- 80
10
votes
1 answer
ASP.Net Core SignInManager lockoutOnFailure
ASP.Net Core has SignInManager which handles user authentication. One of the methods is PasswordSignInAsync(string username, string password, bool isPersistent, bool lockoutOnFailure). Setting lockoutOnFailure to true should temporarily lock out the…

Tedd Hansen
- 12,074
- 14
- 61
- 97
9
votes
3 answers
Identity 3 SignInManager.PasswordSignInAsync() doesn't return any result
I am creating web application with Identity 3.0 and have problems with SignInManager PasswordSignInAsync() method. I'm using it just like in documentation, but it doesn't return anything ( application code just stop there )
Here`s my controller…

PaulJ
- 169
- 1
- 2
- 11
9
votes
4 answers
How to change login url when using asp.net 5
I am using asp.net 5 and Identity 3 to authenticate users but it always redirect to the default login url which is "Account/Login". I want to change it but there does not seem to be anywhere to set this options. I use AddIdentity() in Configure()…

Xiaowei.Jia
- 415
- 1
- 4
- 13
8
votes
3 answers
Checking for one of multiple policies with Authorize attribute in ASP.NET Core Identity
I have setup a standard authentication system up in an ASP.NET Core application.
Users, Roles, RoleClaims(acting as permissions)
In Startup.cs I create a policy for each Role and each Permission. Assuming this would give me full flexibility in my…

Blake Rivell
- 13,105
- 31
- 115
- 231
8
votes
1 answer
ASP.NET Identity (with IdentityServer4) get external resource oauth access token
I have been through the docs of identityServer4 and I have set it up to use Microsoft Office 365 as a login provider. When the user has logged in I want to make a button where he can allow my app to subscribe to his calendar events using the…

Kristian Barrett
- 3,574
- 2
- 26
- 40
8
votes
6 answers
Password reset token provider in ASP.NET core - IUserTokenProvider not found
Hello,
In order to getting password reset work I need to register an IUserTokenProvider instance into DI.
Without it I get exception at following line:
var result = await _userManager.ResetPasswordAsync(user, token, password);
"No…

rudolfdobias
- 1,778
- 3
- 17
- 40
8
votes
1 answer
How to set PasswordHasherCompatibilityMode.IdentityV3 in ASP.NET 5 Identity?
Currently it seems default is set to PasswordHasherCompatibilityMode.IdentityV2 which is HMAC-SHA1 in ASP.NET 5. I tried to create a instance of PasswordHasherOptions to add to services (DI) but could not get it to work.
V3 uses PBKDF2 with…

SamJackSon
- 1,071
- 14
- 19