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
139
votes
6 answers

How to extend available properties of User.Identity

I'm using MVC5 Identity 2.0 for users to log into my website, where the authentication details are stored in an SQL database. Asp.net Identity has been implemented in a standard way as can be found in many online tutorials. The ApplicationUser class…
RobHurd
  • 2,041
  • 7
  • 26
  • 34
109
votes
11 answers

No IUserTokenProvider is registered

I recently updated Asp.Net Identity Core of my application form 1.0 to 2.0. There are new features which I wanted to try like GenerateEmailConfirmationToken, etc. I'm using this project as a reference. When the user tries to register, I get error…
Cybercop
  • 8,475
  • 21
  • 75
  • 135
100
votes
11 answers

ASP.NET Identity change password

I need ability to change password for user by admin. So, admin should not enter a current password of user, he should have ability to set a new password. I look at ChangePasswordAsync method, but this method requires to enter old password. So, this…
Oleg Sh
  • 8,496
  • 17
  • 89
  • 159
83
votes
24 answers

Asp.NET Identity 2 giving "Invalid Token" error

I'm using Asp.Net-Identity-2 and I'm trying to verify email verification code using the below method. But I am getting an "Invalid Token" error message. My Application's User Manager is like this: public class AppUserManager :…
Julio Schurt
  • 2,014
  • 2
  • 19
  • 21
62
votes
2 answers

How To Change Password Validation in ASP.Net MVC Identity 2?

How To Change Password Validation in ASP.Net MVC5 Identity 2 ? Thanks
Nazmul Hossain
  • 2,085
  • 5
  • 25
  • 34
52
votes
1 answer

UseOAuthBearerTokens vs UseOAuthBearerAuthentication

In our Startup class, I have configured the following auth server options: OAuthAuthorizationServerOptions OAuthServerOptions = new OAuthAuthorizationServerOptions() { AllowInsecureHttp = true, TokenEndpointPath = new…
Dave New
  • 38,496
  • 59
  • 215
  • 394
46
votes
6 answers

Why new fb api 2.4 returns null email on MVC 5 with Identity and oauth 2?

Everything used to work perfect until fb upgraded it's api to 2.4 (I had 2.3 in my previous project). Today when I add a new application on fb developers I get it with api 2.4. The problem: Now I get null email from fb (loginInfo.email = null). Of…
Dudi
  • 3,069
  • 1
  • 27
  • 23
37
votes
7 answers

Asp.Net Identity save user without email

I want to save user without email, like this: var user = new ApplicationUser { UserName = model.Name }; var result = await UserManager.CreateAsync(user); But I got error "Email cannot be null or empty". Is there any solution for this? Or it is…
Hagakurje
  • 1,002
  • 2
  • 11
  • 17
36
votes
3 answers

ASP.Net MVC 5 w/identity 2.2.0 Log off not working

I am using a the basic login on a test ASP.Net MVC 5 site (for an internet site). The login works fine but when I try to logout it doesn't happen. The logout link does call the following controller action: public ActionResult LogOff() { …
John S
  • 7,909
  • 21
  • 77
  • 145
33
votes
4 answers

ASP.NET 5 Identity - custom SignInManager

I have a MVC 6 project (vNext) and I am playing around with the ASP.NET Identity. In my case I don't want to use the build-in stuff which uses the EF (SignInManager, UserManager, UserStore). I have an external database and I just want to make a…
33
votes
8 answers

Get list of users with assigned roles in asp.net identity 2.0

I have a drop down list box which lists roles. I want to get the list of users having that role. I mean list of users that are in "Administrator" role or "CanEdit" role. Here is my code: public…
32
votes
1 answer

ASP.NET Identity 2 UserManager get all users async

Can somebody tell if there is a way to get all users async in ASP.NET Identity 2? In the UserManager.Users there is nothing async or find all async or somwething like that
David Dury
  • 5,537
  • 12
  • 56
  • 94
31
votes
3 answers

Invalidate Old Session Cookie - ASP.Net Identity

An external company has done some penetration tests on the ASP.NET MVC 5 application i'm working on. An issue that they raised is described below A cookie linked with session Management is called AspNet.ApplicationCookie. When entered manually,the…
MrBliz
  • 5,830
  • 15
  • 57
  • 81
31
votes
5 answers

Accessing UserManager outside AccountController

I am trying to set the value of a column in aspnetuser table from a different controller (not accountcontroller). I have been trying to access UserManager but I can't figure our how to do it. So far I have tried the following in the controller I…
29
votes
2 answers

Why asp.net Identity user id is string?

I want to use System.Guid type as an id for all of my tables in asp.net web api application. But I also use Asp.net Identity, which using a string-type id (to store guids as well). So I wonder why is it using string id instead of System.Guid by…
1
2 3
70 71