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
4
votes
1 answer

Locked out users can login if they have Auth Cookie

.Net 4.5.1 / MVC 5.1.2 / Identity 2.0.1 Greetings, I needed a way for administrators to disable (can't delete) user accounts so I set the LockoutEndDateUTC field to a future date and I already had the LockoutEnabled field set to true for all users.…
Mike
  • 57
  • 2
  • 5
4
votes
1 answer

AutoFac with ASP.Identity

I'm using AutoFac 3.5 with WebApi Integration 3.3 and Asp.Identity 2.0.1. The problem is that the Asp.Net Identity has a problem when im specyfing MyDbContext as InstancePerRequest. Then I got this kind of errormessage: No scope with a Tag matching…
Rikard
  • 3,828
  • 1
  • 24
  • 39
4
votes
1 answer

Changing default database of Identity/Membership authentication in ASP.NET MVC 5.1

I currently started a new project in Visual Studio 2013 with ASP.NET MVC5 using Entity Framework Model-First. With entity is all fine, by now... haha My question is: There's any way to change the database of Identity without overwriting…
4
votes
1 answer

SignalR Context.User is Null with ApplicationCookie

Context.User is null in my hub, and I'm not sure why. Starup: app.UseCookieAuthentication(new CookieAuthenticationOptions { AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie, AuthenticationMode…
LRFalk01
  • 961
  • 8
  • 17
4
votes
1 answer

Updating AspNetUser Password Hash

I have 2 projects. One of them is using ASP.Net authentication, the other uses Windows authentication, which is the administration side. I want the Admin project to be able to manage the users of the other. I can modify everything except the…
sreimer
  • 4,913
  • 2
  • 33
  • 43
4
votes
1 answer

Are ASP.Net Identity Claims useful when NOT using OAuth/external authentication providers?

Everything I've read about claims-based authentication is essentially about "outsourcing" your authentication process to a trusted 3rd party. See: Explain "claims-based authentication" to a 5-year-old Why Claim based authentication instead of role…
EF0
  • 2,940
  • 4
  • 17
  • 23
4
votes
1 answer

ASP.NET Identity in Domain Driven Design Architecture

Hi I'm starting a project using DDD. I would like to use Asp.Net Identity for user authentication but IdentityUser this very coupled to Asp.net and a domain model object should not have dependencies. This is leading me to think that…
xurxodev
  • 1,639
  • 20
  • 19
4
votes
1 answer

Mixing Owin Asp.Net Identity Cookie Authentication with Owin OpenId Authentication

Does anyone know a good example of mixing Owin Asp.Net Identity Cookie Authentication (local db) with Owin OpenId Authentication (cloud)? Users could then choose to login/register with either creating new user&pass (stored in local database) or via…
4
votes
1 answer

Identity 2.0.0 in MVC5 architecture advice

I'm trying to integrate the recently released ASP.NET Identity 2.0.0 into a 3-layer MVC application. I'm not sure I'm going in the correct direction. I can see two approaches to take. In the first approach, I've gone with integrating Identity into…
OpcodePete
  • 887
  • 1
  • 14
  • 28
4
votes
1 answer

How do you obtain user profile values in ASP.NET Identity 2 of current user?

In an MVC5 application how do you get values from the AspNetUsers table for the current user? For example: one of the default fileds is PhoneNumber. How do you get the phonenumber of the current logged in user? I am using Identity 2...
Steve
  • 655
  • 2
  • 9
  • 26
4
votes
1 answer

How to programmatically login to ASP.NET Identity 2?

How do you programmatically login to asp.net identity 2? This is straight forward against Web API, but MVC only project requires __RequestVerificationToken. This is a login method: [HttpPost] [AllowAnonymous] [ValidateAntiForgeryToken] …
Steve
  • 655
  • 2
  • 9
  • 26
4
votes
1 answer

Unit testing Entity Framework 6 with context inheriting from IdentityDbContext

I'm looking to unit testing some methods using Entity Framework 6 using the instructions provided here. My set-up is slightly different though - I'm also using ASP.Net Identity (the default implementation that uses EF). As such my context inherits…
4
votes
2 answers

How to add a Foreign key in Customer table (CreatedBy column) for AspNetUser table (Id column) in ASP.NET MVC 5 Identity 2.0 using Code First

I have created Empty MVC (ASP.NET Web Application) project using Visual Studio 2013 Update 2 RC & then added AspNet Identity Samples using: PM>Install-Package Microsoft.AspNet.Identity.Samples -Pre I have enabled and added migrations & then…
4
votes
0 answers

ASP.NET Web API + ASP.NET MVC + ASP.NET Identity + AngularJS

I am new to AngularJS. I need to develop a Web API (ASP.NET) which will be consumed by an Android, iPhone and a Web Application. I want to build the web application using ASP.NET MVC to use the built in routing and razor view engine. The first…
Haider
  • 1,488
  • 2
  • 15
  • 29
4
votes
3 answers

Common authentication between two ASP.NET apps based on ASP.NET Identity

I have several applications in my solution, and I want to share authentication between them. To simplify, let's say I have two WebAPI applications. I authenticate using /Token endpoint, and receive Bearer token in return. Afterwards, I put this…