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
0
votes
1 answer
Intended way of accessing options in custom ASP.NET Core Identity implementation
I made a custom PasswordValidator with its own set of options:
class MyValidator : Identity.PasswordValidator
{
Task ValidateAsync(UserManager manager, TUser user, string password)
{
var options = //…

Nick Muller
- 2,003
- 1
- 16
- 43
0
votes
1 answer
Possible problems after changing type of id from string (GUID) to int?
I use ASP.NET Identity 2.0 in my MVC5 project and wanted to change the data type of id field of AspNetUsers from string (GUID) to int because of that I have some tables related to AspNetUsers table. I look at many pages as on How to change type of…

Jack
- 1
- 21
- 118
- 236
0
votes
1 answer
Is there a need to check IsSignedIn and IsInRole as a sign in check
Simple enough question, is this enough? or is there a corner case where a user can end up with some information pointing to not logged in but still with a role of some sort.
@if (User.IsInRole(Roles.Administrator))
or do I have to do this?
@if…

Thomas Andreè Wang
- 3,379
- 6
- 37
- 53
0
votes
1 answer
How do I use DocumentDB.ASPNet.Identity to use existing collection
I have downloaded a copy of the sample MVC code for DocumentDB.AspNet.Identity and provided the link and key to my DocumentDB database. The program runs fine but creates a "Users" collection in the database. I can't quite see where it is doing this…

psycho
- 1,539
- 4
- 20
- 36
0
votes
1 answer
Identity error when to ASP.NET Core MVC RC2 upgrading from RC1
I have from my RC1 version:
services.AddIdentity(options =>
{
// configure identity options
options.Password.RequireDigit = false;
options.Password.RequireLowercase = false;
…

si2030
- 3,895
- 8
- 38
- 87
0
votes
1 answer
ASP.NET MVC 6 custom user identity, persisting the logged-in user for a long time?
So I have ASP.NET MVC 6 + AngularJS application with custom user identity (not using EF) which authenticates the user against different db without EF, etc.
I have a couple of custom implementations of some interfaces needed for the user identity to…

Dilyan Dimitrov
- 789
- 1
- 7
- 24
0
votes
1 answer
How to give a notice message before redirect to login view when use Asp.Net Identity?
I have used the Asp.Net Identity framework in my app.There is a need, when the session expires give a prompt message, and then jump to the login page instead of directly jump to the login page.Prompt information using custom styles.
Because my app's…

Ivan.Yu
- 564
- 1
- 4
- 12
0
votes
1 answer
Angular routing, first page depends on user roles or claims
My question is about angular routing.
In fact I work on SPA application and the templateUrl of the first page depends on user roles (this information I have it in the user service).
As I cannot inject services in app.config how can I get the use…
0
votes
1 answer
asp.net core mvc6 seeding Roles produces different results when repeating database creation
I am getting weird results using Identity 3.0 seeding with integer ids. I am seeding roles - just two - using this:
using JobsLedger.DAL;
using JobsLedger.Models.Identity;
using Microsoft.AspNet.Builder;
using Microsoft.AspNet.Identity;
using…

si2030
- 3,895
- 8
- 38
- 87
0
votes
1 answer
List of Users with their single Role in MVC 6 left joined
Using VS 2015, MVC 6 RC1 and EF 7 RC1 I'm trying to get a list of all users with their single role name.
I have tried all suggestions I have come across on StackOverflow but none have worked.
The SQL I'm looking for is:
SELECT [User].[Email],…

GeoDev
- 33
- 1
- 5
0
votes
1 answer
ASP.NET Identity and creating RoleFunctions
I am using the latest and greatest Identity 3.x that comes stock with MVC6 Core 1.0 when selecting 'Individual User Accounts'.
The requirements of my user auth is the following:
Users -> AspNetUsers
Roles -> AspNetRoles
UserRoles ->…

Blake Rivell
- 13,105
- 31
- 115
- 231
0
votes
0 answers
No authentication handler is configured to handle the scheme: Microsoft.AspNet.Identity.Application when using ASP.NET Core Identity
The error shows up when I try to sign-in the user:
public async Task SignIn(string email, string password)
{
var user = await this._userManager.FindByEmailAsync(email);
if (user == null)
return false;
if (await…

raberana
- 11,739
- 18
- 69
- 95
0
votes
2 answers
How rename Asp.net Identity Role
I add 3 roles to database. "Admin","Moderator" and "User". I want simply rename
"Admin" to "Administrator". I use this code, but its not correct work. Its return me error {"Database operation expected to affect 1 row(s) but actually affected 0…

user1088259
- 345
- 13
- 34
0
votes
0 answers
Identity User.GetUserId() once available, once not in function called by controller
tl;dr: is at the bottom ;)
Imagine that I have database with some notes. To show them to user, I use this method (Entity Framework here):
var allNotes = db.Notes.Where(x => AllowAccess(x.AuthorId, User.GetUserId())).ToList();
AllowAccess() is…

Piotrek
- 10,919
- 18
- 73
- 136
0
votes
1 answer
Asp.Net MVC Core and Identity 3
I'm got a site setup using vnext/core 1.0 that uses Identity 3 for authentication. I can create users, I can change passwords, I can login fine. The issue is, it appears to be ignoring the ExpireTimespan property as I'm randomly kicked out of the…

Phil
- 1,609
- 12
- 24