Questions tagged [asp.net-identity-2]

The second 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 2 features. The [asp.net-identity] tag should be used if your question is not specific to ASP.NET Identity 2.

Resources:

Announcing RTM of ASP.NET Identity 2.0.0

1063 questions
8
votes
1 answer

Where does AspnetIdentity stores UserTokens?

I have ASP.Net MVC5 application. While creating application when you select Individual Authentication visual studio use scaffolding and adds code for Login, Create User, Forgot Password etc. I am using this default implementation of ForgotPassword…
LP13
  • 30,567
  • 53
  • 217
  • 400
8
votes
1 answer

Verify Access Token - Asp.Net Identity

I'm using ASP.Net Identity to implement external logins. After user logins in with Google I get google's external access token. I then make a second api call to ObtainLocalAccessToken() which trades the external access token for a new local…
parliament
  • 21,544
  • 38
  • 148
  • 238
8
votes
3 answers

When will VerifyHashedPassword result be SuccessRehashNeeded

When will the result of Usermanager.VerifyHashedPassword result be PasswordVerificationResult.SuccessRehashNeeded ? What to do if such result occur? When using VerifyHashedPassword i only check it with Success. Is it enough or should i check it…
Ruchan
  • 3,124
  • 7
  • 36
  • 72
8
votes
2 answers

3 tier application with Identity and EF

I am developing a 3-tier project with authentication from scratch. I am using the following as a guide for implementing Identity authentication: http://bitoftech.net/2015/01/21/asp-net-identity-2-with-asp-net-web-api-2-accounts-management/ The issue…
8
votes
1 answer

Include property on ASP.Net Identity 2.0 UserManager.Users.ToListAsync and UserManager.FindByIdAsync

I am trying to implement Asp.Net Identity 2.0. I have managed so far very well with the help of this blog. But I went a slightly different road. I want some data not to be part of the User object, but rather of a newly created Customer object. I…
Mounhim
  • 1,674
  • 1
  • 17
  • 32
8
votes
1 answer

ASP Identity 2.0: Regenerate Identity

I am having trouble getting ASP Identity to refresh its Identity stored in a cookie on demand. In the Startup.Auth.cs file the cookie is set to regenerate as follows: app.UseCookieAuthentication(new CookieAuthenticationOptions { …
Underscore
  • 1,017
  • 2
  • 10
  • 26
8
votes
3 answers

IsPersistent not working - Cookie only valid for current session

I have an ASP.NET MVC 5 application using ASP.NET Identity 2.1.0 for user authentication. Everything worked fine in the past, but now I found out that persisting user sessions does not work anymore. I can not tell what change broke this, but it…
8
votes
1 answer

Generating id for Guid-keyed IdentityUser

I have modified the default MVC5 template to, rather use than string/nvarchar-keyed users, to use Guids/uniqueidentifiers. My solution was similar to the one discussed here:…
Zane Kaminski
  • 529
  • 4
  • 13
8
votes
2 answers

Manually validating a password reset token in ASP.NET Identity

I would like to manually validate a password reset token in ASP.NET Identity 2.0. I'm trying to create my own version of UserManager.ResetPasswordAsync(string userId, string token, string newPassword) that takes and IdentityUser instead of userId…
Jeremy Cook
  • 20,840
  • 9
  • 71
  • 77
8
votes
2 answers

Compilation error 'IUser.UserName' in explicit interface declaration is not a member of interface - why am I gettings this?

I'm using the Asp.Net Identity framework, and I have a User class which looks like this: public class User : IUser { public string Id {get; private set;} public string Email {get; set;} string IUser.UserName { get { return Email;} set {…
Samuel Jack
  • 32,712
  • 16
  • 118
  • 155
7
votes
0 answers

Without using IdentityServer i want a way to authenticate an WebApi app with another ASP.NET MVC app which have the users database

I have Asp.Net MVC project that have users (I used Asp.Net Identity 2 for this) and i have another Asp.Net WebApi service. I want to secure authenticate the WebApi to give access for only the Asp.Net MVC users to hit the end points and i don't want…
Marzouk
  • 2,650
  • 3
  • 25
  • 56
7
votes
3 answers

Duplicate Role Names on Asp.Net Identity and Multi-tenancy

I'm developing a Multi-tenancy web application with ASP.Net MVC and Identity 2.0. I have extended the IdentityRole like this: public class ApplicationRole : IdentityRole { public ApplicationRole() : base() { } public ApplicationRole(string…
Click Ok
  • 8,700
  • 18
  • 70
  • 106
7
votes
1 answer

ASP.NET Identity Phone Number Token lifespan and SMS limit

I'm building 2 factor registration API using ASP.NET Identity 2.0. I'd like to give users ability to confirm their phone numer on demand, so even if they didn't confirm they're phone number when registering they always can request new token (making…
Misiu
  • 4,738
  • 21
  • 94
  • 198
7
votes
1 answer

ASP.NET Identity 2.0 Authenticate against our own bearer server

All, I've got a security server which sole purpose is to provide bearer tokens from a single endpoint: http://example.com/token Example request: POST http://example.com/token HTTP/1.1 User-Agent: Fiddler Content-Type: x-www-form-urlencoded Host:…
Steven Yates
  • 2,400
  • 3
  • 30
  • 58
7
votes
1 answer

How to Add another Propertys to User.Identity From table AspNetUsers in identity 2.2.1

i Add some new property to asp.net identity 2.2.1 (AspNetUsers table) code first public class ApplicationUser : IdentityUser { public string AccessToken { get; set; } public string FullName { get; set; } public string…
MoHaMmAd
  • 95
  • 1
  • 3
  • 13