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.
Questions tagged [asp.net-identity-3]
225 questions
5
votes
2 answers
ASP.NET 5 Identity 3 users get signed out after application restart
We are using ASP.NET Identity 3.
Our users are randomly getting signed out automatically. To reproduce this issue, I tried application restart, all users signed out, even those who had checked Remember me.
It only happens in Production, works fine…

Ali Gonabadi
- 944
- 1
- 10
- 28
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.

Joseph Bailey
- 81
- 6
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": {
…

Mark G
- 2,848
- 1
- 24
- 32
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…

Jeeva J
- 3,173
- 10
- 38
- 85
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,982
- 3
- 24
- 58
5
votes
0 answers
Unable to create new claim identity
I am currently trying to expose a field from an authenticated user, but I'm having a bit of difficulty trying to add a new claim to the authenticated user.
In MVC5 I would do something similar to the following:
public class ApplicationUser :…

Marqueone
- 1,165
- 2
- 14
- 33
5
votes
2 answers
How can the Identity.GetUserId() be made to return a Guid instead of a string?
I am using ASP.Net Identity 2 but soon hope to change to Identity 3 when it becomes more stable (anyone know when that might be?). Here's a sample of my code:
content.ModifiedBy = User.Identity.GetUserId();
The Content table stores ModifedBy as a…

Alan2
- 23,493
- 79
- 256
- 450
5
votes
1 answer
vNext. AspNet.Identity and custom UserStore. UserStore disposed exception
I'm trying to understand vNext.
I wrote custom UserStore, that works with MongoDB and implements these interfaces:
public class UserStore : IUserStore, IUserPasswordStore,…

no_one
- 51
- 3
4
votes
1 answer
ASP.NET Identity vs Azure AD B2C
I've been developing a Cordova app using Azure's Mobile App Service product. It offers external sign-in through Facebook, but it doesn't offer a ready-made solution for storing the user into a SQL database where I can also add custom profile…

kdpnz
- 638
- 6
- 18
4
votes
1 answer
Email cannot be null or empty while creating new user?
I am using IdentityServer 3 for authentication. I am storing users in SQL DB using asp.net identity framework. IndentityServer team has provided simple IdentityManager.AspNetIdentity library for administrators to manage users.
I followed the video…

LP13
- 30,567
- 53
- 217
- 400
4
votes
1 answer
Entity type 'type' is in shadow-state. A valid model requires all entity types to have corresponding CLR type
I am working from an example to set up IdentityServer4 using Asp.net Core and EF core. During the process I wanted to separate my data contracts and data access from the core project. To do that I created two related projects, one containing the…

Hammurabi
- 66
- 2
- 7
4
votes
1 answer
'MyIdentityModels.User' violates the constraint of type 'TUser'
I'm trying to customize ASP.NET Identity Core and I'm getting the following exception: (It Seems to build fine but it crashes even before launching)
Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the…

Vahid Amiri
- 10,769
- 13
- 68
- 113
4
votes
1 answer
Consider using IDbContextFactory to override the initialization of the DbContext at design-time
On an ASP.NET Core 1.0.1 project, using Entity Framework Core and ASP.NET Identity, I have the following context:
public class Context : IdentityDbContext {
public…

Miguel Moura
- 36,732
- 85
- 259
- 481
4
votes
1 answer
Save user session in Redis with ASP.NET Core in Azure
I'm using redis cache for saving some stuff in my project.
I am using Azure (WebApp), and when I do a SWAP between my preproduction environment to production, the user session is lost and he need to relogin in my web page.
I'm using Identity 3.0,…

chemitaxis
- 13,889
- 17
- 74
- 125
4
votes
1 answer
Validate JWT token in C# using JWK
I have JsonWebKeys(JWK) for id_token and access_token. Then I got my id_token, from /token url.
How to validate this JWT id_token using JWK in C#.
Needless to say I have tried almost everything but(IdenityModels.Jwt, etc) but JwtSecurityTokenHandler…

Manish Ranjan
- 51
- 1
- 6