Questions tagged [asp.net-identity]

The ASP.NET Identity system is designed to replace the previous ASP.NET Membership and Simple Membership systems.

The ASP.NET Identity system is designed to replace the previous ASP.NET Membership and Simple Membership systems. It includes profile support, OAuth integration, works with OWIN, and is included with the ASP.NET templates shipped with Visual Studio 2013.

ASP.NET Identity uses code-first Entity Framework to allow for maximum customization through class manipulation, annotation, and new fluent API.

Useful links

8860 questions
74
votes
1 answer

SignInManager,what it is and how,when to use?

I am exploring SignInManager class. But the information given on MSDN is very useless. It only tells what are the methods and properties provided. What I am looking for is, What is SignInManager? How to use it? And I have my own database that…
user786
  • 3,902
  • 4
  • 40
  • 72
72
votes
6 answers

How override ASP.NET Core Identity's password policy

By default, ASP.NET Core Identity's password policy require at least one special character, one uppercase letter, one number, ... How can I change this restrictions ? There is nothing about that in the documentation…
70
votes
3 answers

Can't get UserManager from OwinContext in apicontroller

I'm following a Microsoft sample to implement email validation with Identity 2.0.0 I'm stuck at this part public ApplicationUserManager UserManager { get { return _userManager ??…
Marc
  • 16,170
  • 20
  • 76
  • 119
69
votes
5 answers

How to change type of id in Microsoft.AspNet.Identity.EntityFramework.IdentityUser

(ASP.NET MVC 5, EF6, VS2013) I'm trying to figure out how to change the type of the "Id" field from string to int in the type: Microsoft.AspNet.Identity.EntityFramework.IdentityUser in order to have new user accounts be associated with an integer…
BenjiFB
  • 4,545
  • 10
  • 46
  • 53
68
votes
5 answers

Is ASP.NET MVC 5 incompatible with the WebMatrix SimpleMembershipProvider?

We have an existing application that was build on ASP.NET MVC 4 & Web API. The admin parts of the site use Simple Membership. I'm interested in upgrading the application to MVC 5 / Web API 2, to take advantage of some of the new features that have…
Sixten Otto
  • 14,816
  • 3
  • 48
  • 60
67
votes
12 answers

How to Seed Users and Roles with Code First Migration using Identity ASP.NET Core

I have created a new clean asp.net 5 project (rc1-final). Using Identity Authentication I just have the ApplicationDbContext.cs with the following code: public class ApplicationDbContext : IdentityDbContext { protected override…
Sauron
  • 2,156
  • 5
  • 17
  • 20
67
votes
4 answers

How to add claims in ASP.NET Identity

I am trying to find a document or example of how you would add custom claims to the user identity in MVC 5 using ASP.NET Identity. The example should show where to insert the claims in the OWIN security pipeline and how to persist them in a cookie…
Kevin Junghans
  • 17,475
  • 4
  • 45
  • 62
65
votes
5 answers

Can not instantiate proxy...Could not find a parameterless constructor

I am trying to create a unit test using Moq which tests the MongoDB.AspNet.Identity V2 provider. This line is giving me grief: var appUser = new Mock(); var userStore = new…
ChiliYago
  • 11,341
  • 23
  • 79
  • 126
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
61
votes
5 answers

.NET Identity Email/Username change

Does anyone know how to enable a user to change username/email with ASP.NET identity with email confirmation? There's plenty of examples on how to change the password but I can't find anything on this.
devlock
  • 959
  • 1
  • 9
  • 14
61
votes
3 answers

Why do the ASP.NET Identity interfaces use strings for primary and foreign keys?

I'm looking at the interfaces on the new ASP.NET Identity classes and the database it creates using Entity Framework Code First. I'm using the Visual Studio 2013 RC. At first glance the database schema looks reasonably normal: But all the keys are…
Derek Tomes
  • 3,989
  • 3
  • 27
  • 41
59
votes
5 answers

ASP.NET Identity - Multiple object sets per type are not supported

I got an error using ASP.NET Identity in my app. Multiple object sets per type are not supported. The object sets 'Identity Users' and 'Users' can both contain instances of type 'Recommendation Platform.Models.ApplicationUser'. I saw a few…
magos
  • 3,371
  • 4
  • 29
  • 54
58
votes
1 answer

The AspNetUserLogins table Identity

What is the AspNetUserLogins for? Is It to store the logins from the user? How can I then update this table with that data?
Bryan
  • 3,421
  • 8
  • 37
  • 77
57
votes
9 answers

Redirect to login when unauthorized in ASP.NET Core

In the previous ASP.NET MVC, there was an option to redirect to the login action, if the user was not authenticated. I need the same thing with ASP.NET Core, so I: created a ASP.NET Core project from the Visual Studio template added [Authorize] to…
grokky
  • 8,537
  • 20
  • 62
  • 96
57
votes
3 answers

Asp.net Identity Validation Error

I want integrate IdentityContext with mydbcontext but i am taking this error One or more validation errors were detected during model generation: Ivdb.Dal.Concrete.EFCodeFirst.IdentityUserLogin: : EntityType 'IdentityUserLogin' has no key defined.…
user1924375
  • 10,581
  • 6
  • 20
  • 27