Questions tagged [asp.net-identity-3]

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.

229 questions
6
votes
1 answer

AuthorizationHandler and database dependency injection

We develop an multi-tenant application based on Identity authentication. Each user get a token session, stored in database, to tell if the user is still connected (with expiration time). I store the token (and others informations about the user…
6
votes
3 answers

ASP.NET Identity 2 to 3

Right, so..I think I'm confused!! I have a few ASP.NET MVC 5 sites running using ASP.NET Identity 2.1 and everything is great. I am creating a new MVC 6 site and I would like the users to use there existing credentials that they use for other…
6
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
  • 990
  • 13
  • 19
6
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…
6
votes
2 answers

Redirect Login to Controller Action

Starting with the ASP.NET 5 Web App Template using Individual User Accounts I have managed to get external authentication working with Microsoft accounts. When users click Login they are redirected to ExternalLogin in AccountController like…
6
votes
1 answer

How do I tell UserManager.FindByNameAsync to include a relation?

I am using ASP.NET Identity 2.2.0 with ASP.NET MVC 5.2.3 and Entity Framework 6.1.2. I added a new property and its corresponding table to my database using ASP.NET Identity with Code First like so: public class ApplicationUser { …
Water Cooler v2
  • 29,006
  • 41
  • 139
  • 286
5
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
  • 5,185
  • 7
  • 42
  • 75
5
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…
5
votes
1 answer

When should HttpContext.User.Identity.IsAuthenticated and SignInManager.IsSignedIn(HttpContext.User) be used?

There seems to be some ambiguity about these 2. I use them interchangeably throughout my project and the only reason is because I couldn't figure out when to use one or the other. What would be the cases where one is true while the other one…
Dealdiane
  • 3,426
  • 1
  • 19
  • 32
5
votes
1 answer

ASP.NET Core Identity 3 Cookie timeout

I have a weird issue happening with RC2. I have setup Identity 3 ExpireTimeSpan to 12 hours using the following configuration option options.Cookies.ApplicationCookie.ExpireTimeSpan = new TimeSpan(12,0,0); After logging in to the website and…
5
votes
6 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
  • 28,129
  • 59
  • 187
  • 356
5
votes
2 answers

How can I change the table names used by asp.net identity 3 (vnext)?

The method used in asp.net identity 2 to alter the identity table names does not work in asp.net identity 3.
5
votes
1 answer

JWT bearer tokens w/ ASP.NET Identity 3

Based on the great example by Shaun Luttin at https://stackoverflow.com/a/30857524 I was able to use that code to generate and consume bearer tokens. Minor changes were to get the latest packages: "dependencies": { …
5
votes
1 answer

web api - asp.net identity token expires even for the subsequent request

I am using asp.net identity for the token based authentication in web api. For refresh token, I've implemented based on the following link http://bitoftech.net/2014/07/16/enable-oauth-refresh-tokens-angularjs-app-using-asp-net-web-api-2-owin/ I've…
5
votes
1 answer

Can we extend HttpContext.User.Identity to store more data in asp.net?

I using asp.net identity. I create the default asp.net mvc application that implement user identity. The application use HttpContext.User.Identity to retrieve user id and user name : string ID = HttpContext.User.Identity.GetUserId(); string Name =…
Ahmed Shamel
  • 1,872
  • 2
  • 23
  • 50
1 2
3
15 16