Questions tagged [asp.net-identity]

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

0
votes
0answers
32 views

ASP.Net MVC change default string ID to and int using docs get error tho

I made a basic ASP.Net MVC Web project. I switched all my IDs from string to an int with the Microsoft docs. https://docs.microsoft.com/en-us/aspnet/identity/overview/extensibility/change-primary-key-...
0
votes
1answer
15 views

Load custom configuration settings from database on start [on hold]

I'm writing an ASP.NET Core multi-tenant application and want to load up configuration settings dependent on the user. Each User is an employee of a Company and I want to allow access and make ...
1
vote
0answers
28 views

Asp Net Core MVC Identity Dapper get all users

With the help of Identity Dapper, I want to get a list of all users, but when accessing the Users property from the UserManager class, an exception is thrown. Based on the commentary, I realized that ...
1
vote
1answer
35 views

MVC Identity, enable UserName, but login breakes

I want the user to add their names to the application(and I am successful in storing it) and keep login in with their email. But when login in I get "Invalid login attempt" and I am clueless as to why....
0
votes
0answers
22 views

register a user using asp.net MVC5 IDentity [on hold]

I am new in ASP.net MVC5 I have a registration wizard. That in the wizard I tried to retrive some data from my database about new user After that, I'm asking for Username and Password from user and I'...
-1
votes
1answer
48 views

i am trying to Login to ASP.NET Identity from react js using axios

i am trying to Login to ASP.NET Identity from react js using axios but the server give bad request error. The code of client Side is following. var data = this.state; data = JSON.stringify(data); ...
0
votes
0answers
24 views

Create User & Role error: ApplicationUser doesn't inherit from or implement the contraints type 'IdentityUser'

I am trying to implement role based authentication with asp.net identity and went through many sites and tutorials and I think I am almost there but something is missing as per below. FYI, I ...
0
votes
1answer
36 views

.NET Core EF Primary Key Error on context.SaveChanges()

My Project model has a collection of <AppUsers>: public class Project { public int ProjectID { get; set; } [Required(ErrorMessage =" Please enter a project name")] ...
0
votes
0answers
27 views

Entity Framework Core migrations with identity db context

I've setup a .net core api app to host JWT token authentication using an asp identity database. That part works great. My problem is when I go to add custom classes, every migration I perform is ...
1
vote
0answers
9 views

Can not perform sign in with cookie authentication

I am trying to sign in and HttpContext.User.Identitiy.IsAuthenticated is always false. Configure service services.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme).AddCookie( ...
1
vote
0answers
37 views

Multiple Contexts - Right Way To Use Identity Framework Context And Entity Framework DbContext

I'm learning Identity Framework wonder what is the right way to use it. I have two context - one for Identity Framework and one for my application data (Entity Framework) - call them IdentityContext ...
1
vote
1answer
32 views

UserManager not creating users in Unit Tests

I'm using xUnit & Moq and what I'm trying to achieve is typically create Identity User so it's stored in Entity Framework In-Memory DB. I have established Seed Data functionality - it gets ...
0
votes
0answers
39 views

.NET Core 2.2 Identity write to additional table on CreateAsync()

I've added an additional table to the default Identity schema called UserProfile, which contains things like address information. When a new user registers on the site, I would like to add the users ...
-2
votes
1answer
43 views

UnitOfWork, autofac, Repositories and identity

How can I use Identity in UnitOfWork? I want the AccountController to inherit from UnitOfWork Not from IApplicationUserManager userManager, IApplicationSignInManager signInManager, ...
1
vote
1answer
28 views

Change the Identity Login's success url instead /Home/Index in .NET core

I have developed a .NET core 2.2 project using Individual (Identity Authentication). After login is successful from /Identity/Account/Login application routes to /Home/Index But I want that after ...
0
votes
0answers
10 views

Store multiple user identities

I implemented cookie authentication and google one. And I have this problem: assume I'm logged in with cookie identity and I want to link google account to ASP identity account. But when I ...
0
votes
1answer
16 views

AspNet Core - Settings `NameClaimType` and `RoleClaimType`

How do I change the Identity values NameClaimType and RoleClaimType to "sub" and "role" instead the default SOAP URLs below: (More context on the motivation on this github issue: https://github.com/...
1
vote
1answer
37 views

Use Microsoft Graph with ASP .NET Identity external authentication

I have a web application using ASP .NET Framework. One its features requires to access to the user’s Outlook calendar. For the moment, the application uses the regular ASP .NET Identity ...
0
votes
0answers
8 views

asp mvc5 Identity append cookies on login and clear on logout

I am working on ASP.net MVC5, using default Identity I have 2 child tables of AspNetUsers that are students and Teachers both with foreign key user_id referencing AspNetuser on login I am making 2 ...
0
votes
0answers
9 views

Identity Claims showing as null after accessing

Interesting problem I have. My post-authentication ClaimsIdentity becomes null after being accessed. It doesn't seem to matter how it's access, any access at all nulls out the claims. Viewing the ...
0
votes
0answers
23 views

OAuth authentication with local provider

In the ASP.NET Core 2.2 application, I'm defining OAuth provider. The provider is able to sign-in user and obtain an authorize_code, exchange authorize_code for a token and get user details and cookie ...
1
vote
1answer
17 views

Force google oauth to prompt user to choose an account [duplicate]

As per this you can use the prompt querystring to tell google oauth that you'd like the user to choose the user account. Can someone tell me how to do this in asp.net core - if you're using the ...
0
votes
2answers
28 views

How can I change the value of “.GetUserName()” in the _LoginPartial view to a database field?

I need the value to change to a database field, it should show the name, but how do I do it? <ul class="nav navbar-nav navbar-right"> <li> @Html.ActionLink("Hello " + **User....
0
votes
0answers
13 views

C# Identity cookie causing network related issues

I have a login cookie for when users login, and it lasts for 5 hours. The cookie upon which user logs in and it's logic are like following: public void Configuration(IAppBuilder app) { ...
0
votes
0answers
20 views

windows authentication and individual authentication in one project

I'm using asp.net MVC 5 i just was wondering if I can use windows authentication and individual authentication in one project. Means I would like to switch pro grammatically during the run time. Is ...
1
vote
1answer
33 views

Microsoft Identity 2 SignInManager never returns VerificationRequired

I'm trying to add 2-factor authentication using pin codes sent in email. The 2FA step is only required by users 30 days after they last completed the 2FA step. Project's tech is ASP.NET MVC 5 using ...
0
votes
2answers
24 views

Convert or Create TUser in UserStore From a DbObject in Asp.net mvc 5 Identity “Connot Implicitly convert type”

I am new to Asp.Net Identity, and working on creating my own UserStore, but cannot get TUser to play. I have EntityFramework6 database first in the back end, and I am getting data from there no ...
0
votes
0answers
12 views

Role-based authorization for AWS Cognito

Thanks to newly released module; AWS Cognito is now an ASP.NET Core Identity Provider. It would be nice to do role based authorization via [Authorize(Roles="{Role}")]; however currently it doesn't ...
1
vote
2answers
54 views

Why does OAuth fail when using ASP.NET Identity Core?

I have an ASP.NET Core 2.x project with the following configuration: services .AddAuthentication(options => options.DefaultScheme = CookieAuthenticaitonDefaults.AuthenticationScheme) ....
3
votes
1answer
59 views

Creating a custom SignInManager in Asp,Net Core 3 Identity

I want to create a custom class for my SignInManager, so I've created a class that inherts from SignInManager<> as follows: public class ApplicationSignInManager : SignInManager<...
1
vote
1answer
51 views

Integration between Two IdentityServer4 (aspnet identity)

I'm trying to do IdentityServer4(A) integration with another IdentityServer4(B) implementation. These two are currently working independently from each other. I already did some progress with this, ...
0
votes
1answer
32 views

It is possible to integrate identity core in an asp mvc 5 project?

Right now i'm working on a enterprise project that is migratin from .net to .net core, and we successfully migrate ef 6 to ef core 2.1 in the project. We are not implementing identity yet in the ...
0
votes
0answers
14 views

custumizing Register with identity

I would like to add my own required column in aspNetUser and adapting the identity controller to fit it,so i first added an int column with as FK of the table biblio than i've made adaptation in ...
0
votes
0answers
15 views

Mocking CreateAsync method of UserManager in Identity Core

I am trying to mock the CreateAsync() method of the userManager. I am using ASP.Net Core 2.1. I have mocked the FindByNameAsync() method. I read elsewhere that in Identity 2.0 CreateAsync() method ...
0
votes
1answer
47 views

AuthorizeAttribute for Web API (ASP.NET Core 2)

I want to use AuthorizeAttribute for my Web API methods. But when user is not authorized method returns Login-View instead simple 401-status-code. Startup.cs: public void ConfigureServices(...
0
votes
0answers
40 views

Add password expiry to ASP.NET Core 2.1 MVC Identity

I have an ASP.NET Core 2.1 MVC project using Identity and individual authentication. I ask for help to add password expiry feature to my project. I saw this answer How to setup password expiration ...
1
vote
1answer
20 views

Trying to mock certain functions in ASP Identity (non-core) and will not compile

I have been having trouble mocking some objects that are scattered around the AccountsController from the default project in ASP.NET 5 and it makes it so I can't unit test the controllers. For example,...
0
votes
0answers
25 views

.net core identity token endpoint failing with api call from website but not from postman

I'm setting up an oauth2 server with .net core, and I have it working as long as I use postman. But when I try to make the api call from a web app (in this instance, angularJS), I get an error "...
0
votes
0answers
28 views

Sign out from all sessions IdentityServer4

I have an IdentityServer4 instance that manages authentication and what I discovered is that my small implementation does not seem to be handling correctly a couple of things: 1) "Auto-logging off" ...
-1
votes
0answers
34 views

C# Error CS7036 “There is no given argument that corresponds to the require formal parameter 'store' of…”

I know that there already are some topics for this failure. And that it refers to the error that there is an expexted parameter missing in the constructor. Nevertheless I do not understand why this ...
0
votes
1answer
7 views

Where does one set the Identity 'SetLockoutEndDate' in MVC 5 Framework 4.7.1

I'm trying to enable Lockout in our app. In IdentityConfig.cs is the code to set some of the necessary flags. manager.UserLockoutEnabledByDefault = true; manager.DefaultAccountLockoutTimeSpan = ...
-1
votes
0answers
14 views

ASP.Net Core Identity External Provider Login Using JWT

i am new to using JWT and Cookies so please correct me if i'm wrong But here is my problem: I have succesfully created a .net Core web api for testing and it successfully logs in with Microsoft ...
1
vote
1answer
46 views

.Net Core Custom Authentication using API Keys with Identity Server 4

I have a .NET Core 2.2 Web API that authenticates with JWT tokens. Tokens are generated by Identity Server 4 on a separate API. All the authentication and authorisation works as expected with JWT ...
0
votes
1answer
31 views

UserManager.CheckPasswordAsync always returns failure

I am using AspNet.Identity with a Winforms project. I am finding the user successfully via the passed in username to UserManager.FindByNameAsync, but I cannot get my login to work with the passed in ...
0
votes
0answers
18 views

IdentityServer get time taken to verify client

We want to create a secure API, hence we are using IdentityServer to verify our clients. Here's a snapshot of our code where we setup authentication services.AddAuthentication("Bearer") ....
0
votes
1answer
60 views

The INSERT statement conflicted with the FOREIGN KEY with user Id (ASP Identity)

I'm working on a feature that allows a user to submit a post via a form, it successfully obtains the user Id from AspNetUsers. I have implemented a radio button that gives a user the option to become ...
0
votes
0answers
28 views

Server Cookies not working in identity .net core

I am using a web API core with angular 6 for authentication, I am using Identity with a server cookies everything working good but when I want to use the [Authorize] Attribute with the role or not ...
0
votes
1answer
19 views

Using both AspNet.Identity and OpenConnectId(For Azure AD Signin)

How am I able to make use of both OpenIdConnect(To authenticate with Azure AD) and also allow normal logging in using AspNet.Identity ? I use the following is used in the Startup.Auth for ...
0
votes
2answers
52 views

How to localize ASP.NET Core 2.1 Identity UserName and Password error messages?

I would like to provide localized strings for Identity user name and password error messages in spanish for an asp.net core 2.1 project, since it's always showing messages in english. I tried as ...
0
votes
1answer
25 views

How to get the user's id with asp.net Identity

I'm working on a project that uses Identity to store the user information. So I have a form that allows me to submit data and the information is saved onto the database. But I have an option to allow ...

http://mssss.yulina-kosm.ru